|
Technical Tips and Sample Command [.CMD] Files for use with FastSync® 3780 Software |
|
Need special consulting help in creating your command files? Contact Ted Egan. Click of information. |
Your 3780 communication programs can be automated through the use of command files. Here are samples of real command files (CMD files) that are being used in the field...You can use a text editor (like Microsoft's EDIT or Notepad programs, VEDIT is also good) to create your command file(s). Note that there are no extra lines between the command lines.
Tip for sending files: If you are sending data to the Host Mainframe and the Mainframe expects to see the data as one single file, followed by another file, use the optional (NOEOT) modifier after the file name on the .SEND command line. For example, .SEND,FILENAME.DAT (NOEOT). In other words, the (NOEOT) option tells the remote system that you are not finished sending files. If you have data in more then one file, but the Host Mainframe wants to see the data as a single file, use the (NOETX) optional modifier after the file name. For example, .SEND,FILENAME.DAT (NOETX). The (NOETX) modifier is a way to concatenate a second file to the first file (the one with the NOETX). If you use (NOETX) on the last file you send, the remote will not see the end of file marker and will expect you to be sending more data.
Tip for receiving files: If you are receiving multiple files from the Host Mainframe and you want to receive each file as a separate file, then you just specify the receive command as .RCVE,HostFile and you will receive files starting with hostfile.000, hostfile.001, etc. However, if you want to receive all of the incoming files as a single file, you would use the (NOETX) modifier. In other words, the (NOETX) modifier expect another file and append it to the first file. For example, .RCVE, hostfile (NOETX). You could use (NOETX) if you are receiving, for example a .MESSAGE...LOGON...(NOETX), followed by a .MESSAGE, $$REQ... would be valid. More on Receive [RCVE] Command.
Note: Use these optional modifiers on commands sparingly. The basic .SEND and .RCVE commands themselves are designed to be used WITHOUT OPTIONAL MODIFIERS 95% of the time. DO NOT USE the above OPTIONS UNLESS YOUR SPECIFIC TESTS SHOW THAT THE SPECIFIC OPTIONAL MODIFIER IS REQUIRED.
| Basic Send Command | Basic Receive Command |
| .call,1-810-433-1234 .message,/*signon rmtxxx mbaoa4l .send,testnews.inq .exit |
.CALL,7,1-248-373-1234 .MESSAGE,/*SIGNON RMT198 NTESD02K .RCVE,\EDS\IN\INFILE .EXIT |
Here are samples of real command files (CMD files) that are being used in the field...You can use a text editor (like Microsoft's EDIT or Notepad programs, VEDIT is also good) to create your command file(s). Note that there are no extra lines between the command lines.
| .WAIT
[See Note #1] .RCVE,<filename> .EXIT |
.CALL,<telephone
number> .SEND,<filename> [you use .SENDB for sending a binary file - like an Excel or Lotus123 or Word file] .EXIT |
Note #1: If you are using the Hayes Optima Business modem, the .WAIT command MUST be used for establishing an auto-answer session. One reason for this is the Hayes' default start-up has auto-answer disabled. Another reason is the need to handle the AutoSync protocol initialization after the phone call has come in. Want to see a fancy wait command file generated by one of CTI's customers? Click here.
TARGET (Dayton-Hudson) CONNECT MAILBOX (This particular Host System has several different .CMD files depending upon your requirements). Your logon data (using the .message command) is CASE SENSITIVE - be careful. And spacing is very important too.
| Target- RECEIVE COMMAND | Target - SEND COMMAND |
| .CALL,1010288-1-612-304-XXXX .MESSAGE,$$REQ ID=YOURID BLOCK=06 .RCVE,C:\TARGET\IN\TAR-IN .EXIT |
.CALL,1010288-1-612-304-XXXX .MESSAGE,$$ADD ID=YOURID BID='COMPANYNAME' BLOCK=06 .SEND,C:\TARGET\OUT\TAR-OUT .EXIT |
| Typical Target Command Files: |
Click for a comment from Wayne Pike, IS Manager, NCSC |
| Target - SEND FINANCIAL | Target - SEND INVENTORY |
|
.CALL,9,1-612-304-XXXX .MESSAGE,$$ADD ID=YOURID BID='FINANCIAL' BLOCK=06 (NOETX) [see Note1 below] .SEND, %1 [see Note2 below] .EXIT Note1: There are 42 spaces between BLOCK=06 and the beginning of (NOETX) in the .MESSAGE command |
.CALL,9,1-612-304-XXXX .MESSAGE,$$ADD ID=YOURID BID='INV' BLOCK=06 (NOETX) [see Note1 below] .SEND,%1 [see Note2 below] .EXIT Note1: There are 42 spaces between BLOCK=06 and the beginning of (NOETX) in the .MESSAGE command |
| Note2: Substitute the name of the file you want to send for "%1." Or, you can specify the path and name of the file you want to send after the file name on the command line. For example: fastsync .cmd(target.cmd) (filename) | |
| Target - SEND NON-FINANCIAL | Target - RECEIVE |
|
.CALL,9,1-612-
304-XXXX .MESSAGE,$$ADD ID=YOURID BID='NON FINANCIAL' BLOCK=06 (NOETX) .SEND,C:\TARGET\OUT\filename .EXIT Note: There are 38 spaces between BLOCK=06 and the beginning of (NOETX) in the .MESSAGE command |
.CALL,9,1-612-304-XXXX .MESSAGE,$$REQ ID=YOURID BID='IF' BLOCK=06 .RCVE,C:\TARGET\IN\IF-IN .MESSAGE,$$REQ ID=YOURID BID='MNT' BLOCK=06 .RCVE,C:\TARGET\IN\MNT-IN .EXIT Note: No spaces after the BLOCK=06 statements |
Target Help Desk: 612-761-4100
| Receive Command for Chevy Chase Bank |
|
Sample
command file using the .WAIT Command... |
| Send & Receive Commands in .CMD File | Basic, Send Command w/Logon Information |
|
.CALL,1-608-xxx-xxx .SEND, signon.xxx [using a separate file w/JCL] .SEND,<filename> .RCVE,SHAR-DFT .EXIT |
.CALL,1,608-xxx-xxxx .MESSAGE, *HDR/ [and other signon info] .WAIT, 999 .EXIT |
|
Sometimes, a particular Host may have very old V.32 9,600 baud modems that will not train with the newer V.34+ 33,600 bps modem tones. Therefore, it will be necessary to send your modem a special Hayes "AT" command string as shown below to slow your modem up to a lower speed. (Note - this AT option works in the DOS version of 3780, not the Windows version). |
Codes for lowering speeds: |
|
ATS37=9 .CALL,1-XXX-XXX-XXXX .MESSAGE, - LOGON-JCL - .SEND,SENDFILE .EXIT |
9,600 = 9 |
For Wal-Mart Access Information, click here.
Chrysler Financial Corporation (CFC) through the CTX System
| Command File for Chrysler Financial Corporation | |
|
.RECSIZE,100 .BLOCKSIZE,1900 .CMPRES,OFF .CALL,1-810-XXX-XXXX .MESSAGE,/CTX/LOGON (LOGINID,PASSWORD) (NOEOT) .MESSAGE,/CTX/ENTER (MAIL) (NOEOT) .MESSAGE,/CTX/DELIVER (SRC=LOGINID,DEST=CRFIN,APPL=CF,REF=ABC) (NOEOT) .DELAY,1 .SEND,C:\CFCFILES\CFCDATA (NOEOT NOIRS) .MESSAGE,/CTX/EXIT (MAIL) (NOEOT) .MESSAGE,/CTX/LOGOFF .RCVE,CTXRESP .MESSAGE,/CTX/LOGOFF .RCVE,CTXRESP .EXIT |
Memo: Chrysler Financial does not use Space Compression, therefore the .CMPRES,OFF command. The .SEND command File also uses the .NOIRS command modifier that takes out the Inter Record Separator (Hex 1E character) after each record sent. Reference: Dave Sandel from Plaza Associates. |
Other Chrysler and General Motors Sample Command Files
| Command File from American Custom Software | Simple Send/Receive Command |
|
For Chrysler's CTX System for EDI .BIDS,50 |
General Motors BARS (Billing and Accounts Receivable System) .CALL,1-248-370-XXXX In this case, the NOETX and NOIRS is appropriate since another file is being sent and the NOETX will cause the remote to see the two commands (.message and .send) as if they were part of a single file. The NOETX says do not send either an ETX (End of Text) or an EOT (End of Transmission) protocol to the remote system. The NOIRS says do not send an IRS (Inter Record Separator) protocol characters to the remote system. |
General Motors - EDS/ELIT
| EDS EDI Oriented Command File | EDS.DAT File - part of EDS.CMD File on left |
|
Sample Command File that sends to Host the
JCL:
.MULT_RECS, OFF Some of the JCL file that is provided to you by the Host Mainframe Administrator is shown at the right> Note: Most Mainframes only require you to send a Login ID and Password - not an actual Job Control Language file as shown here.. |
etc. |
|
Another Command
File example where the necessary JCL is part of the .MESSAGE:
.CALL,1-248-xxx-xxxx (RETRIES
15 ERROR 99) Note: Many hosts mainframes require a certain number of spaces between data contained in the JCL. |
|
|
|
.ECHO
[NAME OF HOST CONNECT] 10 .CALL,1-xxx-xxxx (RETRIES 10 ERROR 99) .IF,ANSWERTONE .GOTO 20 .DTR,OFF .DELAY,30 .DTR,ON .DELAY,10 .GOTO 10 20 .SEND,LOGON.TXT .RCVE,INFILE 99 .EXIT |
Ford Motor Company and GM/EDS
| Simple, basic, Send Command | Simple, basic, Receive Command |
| .call,1-810-433-xxxx
(retries 2) .send,testford.dat .send,testnews.inq .rcve,news echo .exit |
.CALL,7,1-248-373-xxxx
(RETRIES 15 ERROR 99) .MESSAGE,/*SIGNON RMT198 NTESD02K .RCVE,\EDS\IN\INFILE 99 .EXIT |
Actual Customer "Problem" Solution
|
"Problem" I need some help with how to best program the command file to receive files. Depending on what time we call, we may have 0 to 5 report files waiting. My question is, how can I program the script file so the receive attempts do not appear like an error if nothing is there for me to pick up. John Ward, Golden America Life Insurance Co. |
Solution 10.CRLF,IRS ON |
|
"Sometimes Problem" (with NFS mapped Drives) To CTI: Thought I better update you on the status of this problem. After your last e-mail, I changed the .cmd file to output the received file to the PC’s C: drive instead of to the mapped NFS drive. We ran NFS Gateway product. |
Solution You haven’t eliminated AIX as part of the problem. FastSync 3780 uses the old Int 21h functions to write files. It is possible that Windows is screwing up when it processes the int 21h function calls going through your network. Your best bet might be to always receive to the local drive and then (in the command file) use the command: .DOS, COPY @LAST_FILE DestinationFileName .DOS Creates a DOS shell for executing DOS commands or programs while still on line with the remote computer. LAST_FILE = FileName This expression will evaluate to TRUE if FileName is the name of the last file successfully received from the remote system. |
TOYOTA TECHNICAL CENTER sample Send Command File
|
.ERROR ERROR 80 .CRLF,ETB OFF .CD_CHECK,ON .CALL,1-734-XXX-XXXX (RETRIES 15 IFERR 70) .SENDB,D:\TCX\LOGON (NOETX) .ERASE,LOGON .MESSAGE,LIST ALL .RCVE,RESPONSE .OPEN,1 @LAST_FILE (READ) (IFERR 70) .READ, 1 $RESPONSE .READ, 1 $RESPONSE .IF NOT COMPARE @$RESPONSE (0:7) = CALLBACKTHEN .GOTO 20 .DTR,OFF .DELAY,1 .DTR,ON .WAIT 20 .SENDB,D:\TCX\busy.log .RCVE,D:\TCX\HUBLST .RCVE,D:\TCX\REMOTE.LST (OVERWRITE) .EXIT 70 .EXIT (70) 80 .EXIT (80) |
First Data Corporation
| First Data Receive File | Notes on First Data |
| .CALL,1-402-397-XXXX .MESSAGE,/*SIGNON RMTXXXX FDXXXX .RCVE,INFILE .EXIT |
|
CTI also markets CLEO® 3780Plus® Software from time-to-time (especially for UNIX machines). Here is a comparison of job/cmd files (these are a type of batch file):
| Actual Customer CLEO® 3780Plus® Job File | Comparable CTI FastSync 3780 Command File |
Note: Capital letters are not necessary - commands are not case sensitive. Comments within brackets are CTI's. |
Note: Capital letters are not necessary - commands are not case sensitive. Comments within brackets are CTI's. |
For a complete command comparison between the CLEO 3780Plus program and the FastSync 3780 program, click here.
AS/400 Command File
| Sample AS/400 Send Command File | |
|
.CMPRES,OFF .RECSIZE,85 .MULTI_RECS,OFF .CALL,1-XXX-XXX-XXXX .SEND,AS4001.FIL (NOEOT) .SEND,AS4002.FIL (NOEOT) .SEND,DATAFILE.000 .EXIT Note: The 3rd .SEND command shows an example name of the data file you would be transmitting to a Host AS/400 computer. |
Many Banks and other financial institutions need a link into an IBM AS/400 Computer System using 2780/3780 Bisynchronous Remote Job Entry Protocol. While each AS/400 Host will require a unique login-in I.D. and Password, the command file shown to the left is typical. |
User Friendly Software developed the following two command files:
| Send Command | Receive Command |
|
.GOTO 15 10 .TRACE,OFF .DOS ECHO ATH > COM2 .DELAY,20 .DOS ECHO ATZ > COM2 .DELAY,20 .GOTO 20 15 .CRLF,IRS ON .IF EXIST_FILE WALMART.QUE THEN .ERASE,WALMART.QUE .IF EXIST_FILE WALMART.997 THEN .ERASE,WALMART.997 .IF NOT EXIST_FILE WALMART.DAT THEN .GOTO 50 .DOS COPY WALMART.DAT INVOICE1.DAT .ECHO, TRYING TO SEND TO WALMART! .TRACE,WALTRACE.SND 20 .CALL 1-xxx-xxx-xxxx (Retries 999) .IF DIALERROR THEN .GOTO 10 .ECHO,**** CONNECT 9600 **** .SEND,LOGON3.TXT (NOETX) .SEND,WALMART.DAT .IF SND_ERROR THEN .GOTO 10 .ECHO, TRANSMITTING EDI TRANSACTION (S) TO WALMART 50 .GOODBYE .DELAY,10 .DTR,OFF .DELAY,10 .DTR,ON .DELAY,10 .EXIT |
.CRLF,IRS OFF .IF EXIST_FILE IMPORT.DAT THEN .ERASE IMPORT.DAT .GOTO 10 05 .GOODBYE .DELAY,10 .DTR,OFF .DELAY,30 .DTR,ON .DELAY,20 .CRLF,IRS OFF 10 .TRACE,WALTRACE.RCV .CALL 1-xxx-xxx-xxxx (Retries 999) .IF DIALERROR THEN .GOTO 05 .ECHO,**** CONNECT 9600 **** .SEND,LOGON1.TXT .IF SND_ERROR THEN .GOTO 05 .ECHO, POLLING WAL-MART FOR INCOMING TRANSACTIONS .RCVE,IMPORT.DAT .IF RCV_ERROR THEN .GOTO 05 .ECHO, **** RECEIVED EDI FILE(s) **** .IF EXIST_FILE IMPORT.BAK THEN .ERASE IMPORT.BAK .IF FILESIZE IMPORT.DAT = 46 THEN .ERASE IMPORT.DAT .IF FILESIZE IMPORT.DAT = 44 THEN .ERASE IMPORT.DAT .IF EXIST_FILE IMPORT.DAT THEN .DOS COPY IMPORT.DAT IMPORT.BAK .IF EXIST_FILE WALMART.DIR THEN .ERASE WALMART.DIR .IF EXIST_FILE WALMART.997 THEN .ERASE,WALMART.997 99 .EXIT |
Based upon the above Receive Command (walmrecv.cmd), here is what their Report File looked like after execution:
|
FastSync ACTIVITY REPORT FOR 10/08/98 AT 10:11 |
FastSync Version 3.5 SN# 3174
Command Line: .CMD(WALMRECV.CMD)
Extended Command Line: .REPORTA(RECEIVE.LOG) (E C R D)
Executing Command File: WALMRECV.CMD
FastSync Command: .BISYNC
The SCC Card Is In Bisync Mode
FastSync Command: .CRLF,IRS OFF
Record Separators Will Not Be Interpreted As CR/LF
FastSync Command: .IF EXIST_FILE IMPORT.DAT THEN .ERASE IMPORT.DAT
File Has Been Deleted
FastSync Command: .GOTO 10
FastSync Command: 10 .TRACE,WALTRACE.RCV
Trace File Name is WALTRACE.RCV
FastSync Command: .CALL 1-xxx-xxx-xxxx(Retries 999)
Autodialing...TONE... 1-xxx-xxx-xxxx
Answer Back Tone Detected
------------10:11:53-------------------STATUS-----------------------
.CALL 1-501-273-1976(Retries 999) PASS
--------------------------------------------------------------------
FastSync Command: .IF DIALERROR THEN .GOTO 05
Condition Did Not Evaluate As True
FastSync Command: .ECHO,**** CONNECT 9600 ****
**** CONNECT 9600 ****
FastSync Command: .SEND,LOGON1.TXT
-----------10:12:35-----STATUS-----BLOCKS---------BYTES-----NAKS-----
.SEND,LOGON1.TXT PASS 0000001 00000031 000
---------------------------------------------------------------------
FastSync Command: .IF SND_ERROR THEN .GOTO 05
Condition Did Not Evaluate As True
FastSync Command: .ECHO, POLLING WAL-MART FOR INCOMING TRANSACTIONS
POLLING WAL-MART FOR INCOMING TRANSACTIONS
FastSync Command: .RCVE,IMPORT.DAT
End Of Text Received From Remote
-----------10:12:36------STATUS-----BLOCKS--------BYTES-----NAKS------
.RCVE,IMPORT.DAT PASS 0000000 00000046 000
----------------------------------------------------------------------
FastSync Command: .IF RCV_ERROR THEN .GOTO 05
Condition Did Not Evaluate As True
FastSync Command: .ECHO, **** RECEIVED EDI FILE(s) ****
**** RECEIVED EDI FILE(s) ****
FastSync Command:
Async Data Has Been Sent
FastSync Command: .IF EXIST_FILE IMPORT.BAK THEN .ERASE IMPORT.BAK
File Has Been Deleted
FastSync Command: .IF FILESIZE IMPORT.DAT = 46 THEN .ERASE IMPORT.DAT
FastSync Command: .IF FILESIZE IMPORT.DAT = 44 THEN .ERASE IMPORT.DAT
Condition Did Not Evaluate As True
FastSync Command: .IF EXIST_FILE IMPORT.DAT THEN .DOS COPY IMPORT.DAT IMPORT.BAK
FastSync Command: .IF EXIST_FILE WALMART.DIR THEN .ERASE WALMART.DIR
FastSync Command: .IF EXIST_FILE WALMART.997 THEN .ERASE,WALMART.997
FastSync Command:
Async Data Has Been Sent
FastSync Command: 99 .EXIT
|
FastSync ACTIVITY REPORT FOR 10/08/98 AT 10:12 |
|
Sample Command used by the automatic filers to the IRS |
| .ECHO .ECHO, Stallion Software, Inc. -- Direct Electronic Filing .ECHO, To abort sending %4.irs - press F10. .IF, EXIST_FILE %3.ack THEN .GOTO 075 .IF, EXIST_FILE %4.irx THEN .GOTO 076 .ECHO, Dialing IRS: %1 005.CALL,%1 (ERROR 025 RETRIES 01) .ECHO, Login with IRS using ID: %2 .MESSAGE,%2 (ERROR 035) .ECHO, ...link completed! .RCVE,CONS (ERROR 100) .MESSAGE,Y (ERROR 100) .ECHO, IRS is sending acknowledgement file: %3.ack .RCVE,%3.ack (ERROR 045) .ECHO, ...received acknowledgement file! .RCVE,CONS (ERROR 100) 015.ECHO, Send IRS the Electronic Returns: %4.irs .IF, NOT EXIST_FILE %4.irs THEN .GOTO 055 .SEND,%4.irs (ERROR 065) .ECHO, ...returns sent successfully! .ECHO, ...archiving: %4.irs .RENAME,%4.irs %4.irx .RCVE,CONS 020.ERASE,FAILURE .GOTO 999 !025.IF, BUSY THEN .GOTO 005 025.IF, BUSY THEN .GOTO 026 .ECHO .IF, NOT DIALTONE THEN .GOTO 027 .IF, NOT CONNECTED THEN .GOTO 028 .ECHO, Connection was not established with IRS. .ECHO, ...unable to determine the cause of failure. .GOTO 100 !026.ECHO, Busy Signal Detected at IRS. ! .ECHO, ...try again later. ! .GOTO 100 026.ECHO, Press F10 to stop redial - busy signal at IRS: %1 .GOTO 005 027.ECHO, Unable to detect dial tone. .ECHO, ...check the phone connections. .GOTO 100 028.ECHO, No answer at: %1 .ECHO, ...check the number and try again. .GOTO 100 035.ECHO, Your Login ID was not received by the IRS computer. .ECHO, ...verify entry for ETIN and PASSWORD. .GOTO 100 045.ECHO, ...acknowledgement file reception failure. .GOTO 100 055.ECHO, ...no returns to send. .ERASE, FAILURE .GOTO 999 065.ECHO, ...error sending returns. .GOTO 100 075.ECHO, Existing ACK file: %3.ack .ECHO, ...process this ACK file then try again. .GOTO 100 076.ECHO, Existing IRX file: %3.irx .ECHO, ...archive this IRX file then try again. .GOTO 100 100.ECHO, .ECHO, Communications link terminated prematurely. .ECHO, ...transmission was NOT successful. .ECHO, Check the file 'FASTSYNC.RPT' for further analysis. 999.ECHO, End of session. .EXIT |
.R_TIMEOUTS,36
.CALL, 9,1-800-366-9638 (retries 3 error 085)
.MESSAGE, +LOGON xxxxxxxx,xxxxxx,xxxxx (noetx)
.MESSAGE, +EXECUTE STATUS,TYPE=OUTPUT
.RCVE,d:\externaldata\networkreports\AdvRecFile614200214217 (error 099)
080.EXIT
085.ECHO, A connection was not established with the network.
.IF, BUSY THEN .GOTO 086
.IF, NOT DIALTONE THEN .GOTO 087
.ECHO, Unable to determine the cause of the failure for this attempt.
.GOTO 099
086.ECHO, Busy Signal Detected on the callup network.
.goto 099
087.ECHO, Unable to Detect Dial Tone...Check Your Phone Connections.
.GOTO 099
099.EXIT 99
|