SeanHoppe.com Cleo Best Practices How to Create FTP Network, Ports, & Scripts
How to Create FTP Network, Ports, & Scripts
Step by Step FTP Set-up:
Create Cleo/Extol Network
- a. Via Extol main menu take:
- option 10. Communications Setup
- Option 60. Trading Partners and Networks Menu
- Option 6. Work with networks
- F9=Create new Network
- Use *FTP_xxx where xxx = TPID(Trading Partner)
Create Extol Port
- 8. Work with network ports
- F9=Create new Port
- Name Port as FTPIN and define similar as shown below:
Create Extol Port :; Sample Port
TNPPV2R Change network port - file or tape I/O 10/08/15 12:51:46 TOL/EDI NEW TEST Network ID . . . . . . . . : *FTP_ABC Network port code . . . . : FTPIN Network port description . . ABC Flat Inbound 91 Message queue . . . . . . . QSYSOPR Data area for override . . . / Data/tape file library . . . EXT_FTP Data/tape file name . . . . ABC_IN CRTCNNIMP from file/ File member/tape device . . ABC_IN CRTCNNIMP from file/ File format type . . . . . . N Nonwrapped data file/tape Database or tape file . . : F Database file Maximum record length . . . 91 Maximum block length . . . . 91 Create file . . . . . . . . Y Add member . . Y Replace/add rcds . . R
Create Communications Script
From Communication Setup Menu, take option 2: (Working Example is: *FTP_ABC)
Network . . . : *FTP_AFS AFS FTP File Exchanges Script code . : RCV_ORDERS Name: Rcv Prop ORDER w/Cleanup Status: D
- Locate an existing RCV or SND script and take Option 3 to “Copy” an existing script and modify.
- Change trading partner unique values within script and create a WRKLNK directory for you TP:
- mkdir '/extol/ftpin/jem'
Modify script details as Needed
- If you need to rename the files after pick up then on the FTPCLNUP submitted job, specify: RNMDEL(R) rmsgf(@NL/FTPMSGF) rmsgid(ftp0004) where the message file determines the value for the renamed file extension to be.
- If you want to simply delete the files after pick up, then RNMDEL(D) is used without the rmsgid and rmsgf parms.
- If Propritary, replace program to call at end of your script to your Prop CL Program.
- If X12, the data will be unwrapped and translated.
To Initiate Script
Users can create CL to call a CL program like below passing parms: Port(FTPIN), Script(your script name), Script parm(‘ ‘), Netid(Your Network ID)
Columns . . . : 1 71 Browse EDILIB/QCLSRC SEU==> ESTRCTLSCR FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 *************** Beginning of data ************************************* 0001.00 /*-------------------------------------------------------------------*/ 0002.00 /* JSTRCTLSCR - Generic robot CL to execute Extol's STRCTLSCR command*/ 0003.00 /*-------------------------------------------------------------------*/ 0004.00 /*** ***/ 0005.00 /* ----------------------------------------------------------------- */ 0006.00 0007.00 PGM PARM(&NETPORT &SCRIPT &SCRIPTPARM &NETID)
Notes:
&Scriptparm can be passed as ‘ ‘ (Blank), however if you need to pass parms to your script, your script can reference rthem as @P1, @P2, etc… Scritparm is only 30 chars however and each parm is seperated by a comma.
By: Sean Hoppe on