Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem in FTP data from LINUX to Mainframe.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kbmkris

Active User


Joined: 24 Jun 2006
Posts: 101

PostPosted: Wed Sep 05, 2007 2:45 pm    Post subject: Problem in FTP data from LINUX to Mainframe.
Reply with quote

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
Code:
hi\n.how r\n.fadf


It should come like
Code:
hi
how r
fadf


The dataset TST.PROD.PARMLIB(TSTUPX02) contains the login credentials.

Please let me know where the problem is

Thanks
Bala
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Sep 05, 2007 3:02 pm    Post subject: Reply to: Problem in FTP data from LINUX to Mainframe.
Reply with quote

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
View user's profile Send private message
kbmkris

Active User


Joined: 24 Jun 2006
Posts: 101

PostPosted: Wed Sep 05, 2007 3:19 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Sep 05, 2007 3:28 pm    Post subject: Reply to: Problem in FTP data from LINUX to Mainframe.
Reply with quote

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
View user's profile Send private message
kbmkris

Active User


Joined: 24 Jun 2006
Posts: 101

PostPosted: Wed Sep 05, 2007 3:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Mainframe scheduling tool ddhar Compuware & Other Tools 2 Wed Sep 27, 2017 12:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us