IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Moving files across systems using FTP


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mbattu

New User


Joined: 19 Jan 2011
Posts: 13
Location: Toronto

PostPosted: Wed Jan 08, 2014 9:42 pm
Reply with quote

Hi,

I am not sure where to post this query, so I am sorry.

I am sending a file using FTP through JCL. The file is moved to a Windows server and from there it is moved to Unix system through SFTP.

The problem I am facing is, the file has no new line characters when in mainframe. On windows OAOD are added automatically and when this is finally moved to Unix system, OA is identified as newline and extra OD is showing up as ^M.

Is there any process to suppress adding of OAOD. The file moving across various systems is standard and can't be altered. Thanks

Code -

Code:
//FTP01    EXEC PGM=FTP,REGION=2M,COND=(0,NE)
//*                                           
//SYSOUT   DD SYSOUT=*                       
//SYSPRT   DD SYSOUT=*                       
//OUTPUT   DD SYSOUT=*                       
//INPUT    DD DSN=&&FTPFILE,DISP=SHR 
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 882
Location: The Universe

PostPosted: Wed Jan 08, 2014 10:19 pm
Reply with quote

mbattu wrote:
.. Is there any process to suppress adding of OAOD. ...
No.

You are correct when you say z/OS data sets do not use any sort of line terminator.

When z/OS FTP transfers a data set as a text file, it adds a NL character at the end of each logical line. When Windoze FTP receives a text file, it converts the NL character to the Widoze CR LF.

When Windoze FTP transfers a file as a text file, it translates the Windoze CR LF to a NL character. What the receiving system does is up to the standards of the system.

I think - but do not know this to be a fact - you are transferring the Windoze text file as a "binary" (or "image") file, so the CR LF is transferred as is. You might try to change the transfer so it is a text file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19245
Location: Inside the Matrix

PostPosted: Thu Jan 09, 2014 12:44 am
Reply with quote

Hello,

Is there a need for the data to go to the Windoze box? Only to allow the sftp to unix?

Why not transfer the data data directly to the unix box? There is add-on software that will allow a USS process to send an sftp.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Jan 09, 2014 5:22 am
Reply with quote

Look up how to code the "LOCSITE" command. It sounds as if you want to specify LOCSITE SBSENDEOL = NONE.
Back to top
View user's profile Send private message
mbattu

New User


Joined: 19 Jan 2011
Posts: 13
Location: Toronto

PostPosted: Thu Jan 09, 2014 3:32 pm
Reply with quote

Hi superK,

As there is an intermediary system (Windows), will using LOCSITE works. If there is no end of line charater, windows may consider the data as single instream and beyond a point data may be truncated right?
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Jan 09, 2014 9:53 pm
Reply with quote

You can specify SBSENDEOL = LF and it will ONLY put the LF on there. Then, you can send from Windows to Unix as binary and you should be OK.

So....MF to Windows:SITE SBSENDEOL=LF
Windows to Unix : BINARY
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Fri Jan 10, 2014 12:40 am
Reply with quote

Quote:
If there is no end of line charater, windows may consider the data as single instream and beyond a point data may be truncated right?
TEXT transfers in FTP will automatically append the newline character(s) to the end of each record; FTP understands mainframe records and will handle the newline character correctly. Hence when the file arrives at the server (Windows), there will be newline character(s) on each record even though the mainframe does not use newlines. And Windows does not really have the concept of records, so there will be no truncation of data -- unless the application you are using to process the data truncates data. Windows itself will not truncate data, though, unless you exceed the 2 GB file limit (for 32-bit Windows).
Back to top
View user's profile Send private message
mbattu

New User


Joined: 19 Jan 2011
Posts: 13
Location: Toronto

PostPosted: Fri Jan 10, 2014 11:52 pm
Reply with quote

Thanks Goodman, it worked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Get two files from one file with diff... DFSORT/ICETOOL 10
This topic is locked: you cannot edit posts or make replies. I HAVE 2 INPUT FILES WITH SAME LAYOUT... COBOL Programming 6
This topic is locked: you cannot edit posts or make replies. Copy list of files from PS to another... CLIST & REXX 11
No new posts JOINKEYS to match two input files on ... DFSORT/ICETOOL 3
No new posts Group comparison/update between two f... DFSORT/ICETOOL 10
Search our Forums:

Back to Top