Dear All,

We need some help on preparing a script to connect to GE ecXpress network
(from Gentran NT 2.1.1) for non-edi file transfer.

What we would like to do is:
----------------------------------------
Send:
 - ftp
 - open ecXpress port
 - user username
 - password
 - bin
 - put filename %receiver_mailbox_id%%%b
 - quit

Receive:
 - ftp
 - open ecXpress port
 - user username
 - password
 - bin
 - one at a time until there are no more to retrieve
    - get filename
    - get filename
    - ...
or
 - take a mailbox list
   - ls mb
 - parse the list and then loop over the list of sender reference numbers
   - get <sender reference number> filename
 - quit
--------------------------------------------

We have tried a few things on the send script, but we still can not send the
non-edi file from Gentran to recipient mailbox on the GE ecXpress network.
The following is the send script that we are working on. Please have a look
at it and advise us if there is a solution.

--------------------------------------------
scriptvar string[16] MailboxID;

// define run-time variables
integer MsgId;
integer AtmId;
integer Result;
integer Result1;
// original string[128] FileName;
string[128] FileName;
string[18] sParm;
string[10] sResult;
string[20] sFinal;
string[10] sResult1;
string[20] sFinal1;
sParm = " %CMLBINTEST2%%%b";

// Set File Transfer Mode to Binary
FtpSetMode(BINARY);

// send procedure
//if DoSnd then
//begin
   MbxStartMsgLoop();
   while MbxGetNextMsg(MsgId) != 0 do
   begin
      MbxStartAtmLoop(MsgId);
      while MbxGetNextAtm(AtmId) != 0 do
      begin
         MbxGetAtmFileName(MsgId, AtmId, FileName);
         FileName = FileName + " " + MailboxID;
         FtpSndAtm(MsgId, AtmId, FileName);
         SndOK(MsgId, AtmId);
         Logmessage(FileName);
//         Result = FtpDoCmd("lcd", "c:\temp");
//         Result  = FtpDoCmd("put", "horace.txt %CMLBINTEST2%%%b");
//         Result  = FtpDoCmd("put", FileName);
//         Result1 = FtpDoCmd("put","theta.txt %CMLBINTEST2%%%b");
         ntoa(Result, sResult);
//         ntoa(Result1, sResult1);
//         sFinal = "DoCmd=" + sResult;
//         sFinal1 = "DoCmd=" + sResult1;
//         logMessage(sFinal);
         logmessage(sResult);
//         logMessage(sFinal1);
//         logmessage(sResult1);
         SndOK(MsgId,AtmId);
      end
      SndOK(MsgId);
   end
//end

// receive procedure
//  if DoRcv then
//begin
   //FtpChangeDir("&m");
   //FtpRcvMsg("byparm");
//end

SetStatus(SUCCESS);
-----------------------------------------------------------

Thanks for you help.



> --------------------------------------------------------------------------
> -------------
> Regards,
>
> Horace C. MAK
> e.trading
> e.colesmyer
> (http://et.colesmyer.com.au/)
>
> Coles Myer Ltd (http://www.colesmyer.com.au).
> 800 Toorak Road, Tooronga, Victoria 3146, Australia
> E-mail:       [EMAIL PROTECTED]
> Phone:        +61-3-9829-6062
> Fax:  +61-3-9829-3928
>
>
>
>
This email and any attachments may contain privileged and
confidential information and are intended for the named
addressee only.  If you have received this e-mail in error,
please notify the sender and delete this e-mail immediately.
Any confidentiality, privilege or copyright is not waived or
lost because this e-mail has been sent to you in error.  It
is your responsibility to check this e-mail and any
attachments for viruses.

Reply via email to