View previous topic :: View next topic
|
Author |
Message |
kbmkris
Active User
Joined: 24 Jun 2006 Posts: 101
|
|
|
|
Hi,
I am FTP'ing data from LINUX to Mainframe using FTP JCL. While doing FTP the data is not coming properly. That is the newline character is not being deducted and so the lines are coming in the mainframe dataset continuously in a single line. Please find the code below.
Code: |
//JOBLIB DD DSN=TST.LOADLIB,DISP=SHR
//J01 EXEC PGM=FTP,REGION=3M
//INPUT DD DSN=TST.PROD.PARMLIB(TSTUPX02),
// DISP=SHR
// DD *
pwd
cd /acceptance/xp2/listings
get names.txt 'TST.BALA.DSN4'
quit
/*
//OUTPUT DD DSN=TRANSFER.LOG,
// DISP=(,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=VB,LRECL=200,BLKSIZE=0),
// LABEL=RETPD=99
//SYSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=(0,SYSABOUT)
//SYSDBOUT DD SYSOUT=(0,SYSDBOUT)
//SYSUDUMP DD SYSOUT=(0,SYSUDUMP)
//* |
The output dataset TST.BALA.DSN4 contains
It should come like
The dataset TST.PROD.PARMLIB(TSTUPX02) contains the login credentials.
Please let me know where the problem is
Thanks
Bala |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Does the incoming ASCII text data contain the required CR/LF (x'0D0A') end-of-line (EOL) delimiters or doesn't it? It seems as if that requirement isn't being met. |
|
Back to top |
|
|
kbmkris
Active User
Joined: 24 Jun 2006 Posts: 101
|
|
|
|
Hi Kevin,
The mode of Transfer is Binary. Even if i specify the mode of transfer as ASCII, the file transfers happened in Binary mode only.
The new line character is not being sensed. Below is the display with HEX ON.
Code: |
Apple.Cat.Bat..
C99982C8A2C8A22
177355313521355 |
the above should be like
Apple
Cat
Bat
The new line character is sensed as a dot '.' in the mainframe file. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm not sure what you're attempting to show.
A proper ASCII text file looks something like this:
Code: |
-d
0B06:0100 41 70 70 6C 65 0D 0A 43-61 74 0D 0A 42 61 74 0D Apple..Cat..Bat.
0B06:0110 0A 0D 0A 3A 45 FF 74 05-AA C6 46 00 34 00 F5 0A ...:E.t...F.4...
0B06:0120 06 E8 74 00 C3 E8 05 DB-3D 03 00 74 05 3D 05 00 ..t.....=..t.=..
0B06:0130 75 60 C6 46 00 00 8A 7E-04 F6 C7 04 74 E6 C6 46 u`.F...~....t..F
0B06:0140 00 02 8B 76 02 80 3C 00-74 4B B3 2E 38 1C 74 45 ...v..<.tK..8.tE
0B06:0150 B3 3A 38 5C FE 74 05 C6-46 00 01 4E 32 DB 86 1C .:8\.t..F..N2...
0B06:0160 E8 39 EB 3B D6 73 1B 56-51 8B CE 8B F2 AC E8 B2 .9.;.s.VQ.......
0B06:0170 E1 74 09 AC 3B F1 72 F5-59 5E EB 0B 3B F1 72 ED .t..;.r.Y^..;.r.
-q
|
|
|
Back to top |
|
|
kbmkris
Active User
Joined: 24 Jun 2006 Posts: 101
|
|
|
|
Hi Kevin,
The first line is the dataset contents. The second and third line is obtained by using HEX ON in the dataset. Moreover, irrespective of binary or ascii mode of transfer, the file content is same. I am not sure of why it is so.
My ultimate doubt is why the FTP job is not able to transfer the file content as it is in LINUX to Mainframe. i.e. the lines are not coming separately and the data is truncated at 256th position.
For your information, the same FTP job works fine when uploading the data from UNIX. |
|
Back to top |
|
|
|