Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Target via Gentran ASYNCH

Status
Not open for further replies.

kjw1969

IS-IT--Management
Jul 4, 2002
6
0
0
US
Does anyone have a sample script to connect to Target ASYNCH using Gentran scripting?
 
Hi, We are now using OFTP but this is what our old Asynch script looked like:

//Advantis DCL

// define user editable variables
scriptvar string[8] LogonAcct;
scriptvar string[8] LogonId;
scriptvar string[8] LogonPsw;
scriptvar string[8] IEAcct;
scriptvar string[8] IEId;
scriptvar string[8] IEPsw;
scriptvar optional string[8] NewLogonPsw;
scriptvar optional string[8] NewIEPsw;

// define run-time variables
integer MsgId;
integer AtmId;

// logon procedure
Pause(1);
AsciiSndCtl("^0D");
Pause(1);
AsciiSndCtl("^0D");
AsciiRcvCtl("=>");
AsciiSndCtl("^01^1B^0AEXP6^0D");
AsciiRcvCtl("TERMINAL TYPE = EXP6");
AsciiSndCtl("^04");
AsciiRcvCtl("^04");
DclLogon(LogonAcct, LogonId, LogonPsw, IEAcct, IEId, IEPsw, NewLogonPsw, NewIEPsw);

// send procedure
if DoSnd then
begin
MbxStartMsgLoop();
while MbxGetNextMsg(MsgId) != 0 do
begin
MbxStartAtmLoop(MsgId);
while MbxGetNextAtm(AtmId) != 0 do
begin
DclSndAtm(MsgId, AtmId);
SndOK(MsgId, AtmId);
end
SndOK(MsgId);
end
end

// receive procedure
if DoRcv then
DclRcvMsg();

DclLogoff();
SetStatus(SUCCESS);


Hope it helps.

Hugh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top