BillD wrote:
We're converting from VSE to z/OS.  I'm trying to upload a CSV file
that has worked on VSE but has problems with trunc/wrap, CRLF or
something else on Z/OS.

This is what works in VSE. The file dump below shows the second record
as part of the first then the third is part of the second, etc.

// EXEC BSTTFTPC,SIZE=BSTTFTPC   (Barnard Software)
ID 02
OPEN <snip>
USER <snip>
PASS <snip>
CWD /ASN2MRP
OUTPUT SAM FTPU1 BLKSZ 16000 RECSZ 80 RECFM FB
TYPE A
pad on
padchar 64
RETR poeta.csv
QUIT

REC NO 000000001  119457,20060907,15360,008-0393-00,04,10854


FFFFFF6FFFFFFFF6FFFFF6FFF6FFFF6FF6FF6FFFFF44444444444444444444444444444444444444

119457B20060907B15360B00800393000B04B1085400000000000000000000000000000000000000

1.......10........20........30........40........50........60........70........80
REC NO 000000002  119447,20060907,7680,008-0347-00,04,10854


FFFFFF6FFFFFFFF6FFFF6FFF6FFFF6FF6FF6FFFFF444444444444444444444444444444444444444

119447B20060907B7680B00800347000B04B10854000000000000000000000000000000000000000

1.......10........20........30........40........50........60........70........80
REC NO 000000003  119445,20060907,15360,008-0344-00,04,10854


FFFFFF6FFFFFFFF6FFFFF6FFF6FFFF6FF6FF6FFFFF44444444444444444444444444444444444444

119445B20060907B15360B00800344000B04B1085400000000000000000000000000000000000000

1.......10........20........30........40........50........60........70........80
REC NO 000000004  119453,20060907,7680,008-0390-00,04,10854


FFFFFF6FFFFFFFF6FFFF6FFF6FFFF6FF6FF6FFFFF444444444444444444444444444444444444444

119453B20060907B7680B00800390000B04B10854000000000000000000000000000000000000000

1.......10........20........30........40........50........60........70........80

FYI - these files aren't exactly the same.  One is on our VSE box, the
other on z/OS.
I started with this in z/OS but have tried numerous other options to no
avail.

//STEP0010 EXEC PROC=FTP
//FTPU1    DD  DSN=&HLQ.PO.XF.FTPD.PU240.INPUT(+1),
//             DISP=(NEW,CATLG,DELETE),
//             LRECL=80,
//             RECFM=FB
//SYSPRINT DD  SYSOUT=(X)
//SYSIN    DD  *
FS190
;CD /ASN2MRP
ASCII
site type i
get poeta.csv //DD:FTPU1
QUIT

Gives me this.
....+...10....+....20....+...30....+...40....+...50....+...60....+...70....+...80
119447,20060907,7680,008-0347-00,04,10854
119447,20060907,15360,008-0347-00,04,
119447,20060907,15360,008-0347-00,04,10854
119445,20060907,15360,008-0344-00,04
119445,20060907,15360,008-0344-00,04,10854
119453,20060907,7680,008-0390-00,04,
119453,20060907,7680,008-0390-00,04,10854
119457,20060907,15360,008-0393-00,04,
119457,20060907,15360,008-0393-00,04,10854
119442,20060808,15360,008-0340-00,04
119442,20060808,15360,008-0340-00,04,10854

Should be this.
119447,20060907,7680,008-0347-00,04,10854
119447,20060907,15360,008-0347-00,04,10854
119445,20060907,15360,008-0344-00,04,10854
119453,20060907,7680,008-0390-00,04,10854
119457,20060907,15360,008-0393-00,04,10854
119442,20060808,15360,008-0340-00,04,10854

What I'm looking for is a way to properly pad the output replacing the
CRLF with a string of blanks to make an 80 byte record.
Does anyone have an example of FTP subcommands required for a good
result under z/OS?
I also tried IND$FILE via Extra.  It created a VB file on z/OS that was
fine.  I couldn't get FTP to properly copy to a VB File.  This is a
tough one!


What OS is the FTP server on?

You have "ASCII" so that z/OS client thinks the file transfer will be ASCII. However you also issue the command "SITE TYPE I" which should tell the server to do a binary tranfer. This means that the server will not put CRLF on the end of the record.

You should be able to remove the "site type i" command and as long as the source records are less than 80 bytes you should get what you want, using FB.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to