FTP issue from ETL Server to Mainframe

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
horserider
Participant
Posts: 71
Joined: Mon Jul 09, 2007 1:12 pm

FTP issue from ETL Server to Mainframe

Post by horserider »

JOB:

I read a SQL Server Table and then populate a text file(orderdetails.txt). Total record length of text file is 160 characters (total 15 columns).

SEQUENCER:
Once the job completes successfully, I am running a shell script (as below) that connects to a mainframe server and puts the text file
------------------------------------------------------------
FTP <host Name>
UserID
Password
LCD /dir/textfiledir/
put orderdetails.txt 'CRHY.PROD.ORDERDET'
bye
-------------------------------------------------------------

Issue:

Everything runs fine, only when I login to mainframe to see 'CRHY.PROD.ORDERDET' it has ONLY 80 characters record length. Rest all columns values are just gone

Question:
What command should I put in my FTP script, so that it transfers COMPLETE RECORD LENGTH to the mainframe server?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You are probably doing an ASCII (as opposed to a BINARY) ftp. If you file contains only text then this should be OK, as it will convert from your ASCII server to the mainframe's EBCDIC and it ought to be conserving the line length. You can try adding a "BINARY on" to your FTP commands and see if the data arrives with the correct length (the text contents will be garbage, since the ASCII-EBCDIC conversion hasn't been done).
shamshad
Premium Member
Premium Member
Posts: 147
Joined: Wed Aug 25, 2004 1:39 pm
Location: Detroit,MI

Post by shamshad »

There are some parameters that are used when uploading files on Mainframe, You might want to use something like below

FTP www.hostname.com
user myuser mypasswd
ascii (or binary whatever the case may be)
Quote Site Tracks Primary=NN Secondary=NN
Quote Site LRECL=NN

PUT abc.txt 'fprod.test.abc.txt'
Bye

NN= Any number that is appropriate for your file that is being uploaded on mainframe.
Post Reply