Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Moving files across systems using FTP

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

New User


Joined: 19 Jan 2011
Posts: 5
Location: Hyderabad

PostPosted: Wed Jan 08, 2014 9:42 pm    Post subject: Moving files across systems using FTP
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 User


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

PostPosted: Wed Jan 08, 2014 10:19 pm    Post subject: Re: Moving files across systems using FTP
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

Site Director


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

PostPosted: Thu Jan 09, 2014 12:44 am    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Jan 09, 2014 5:22 am    Post subject: Reply to: Moving files across systems using FTP
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: 5
Location: Hyderabad

PostPosted: Thu Jan 09, 2014 3:32 pm    Post subject:
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    Post subject:
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: 7912
Location: Bellevue, IA

PostPosted: Fri Jan 10, 2014 12:40 am    Post subject:
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: 5
Location: Hyderabad

PostPosted: Fri Jan 10, 2014 11:52 pm    Post subject:
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    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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Moving a PD to PD spoorni DFSORT/ICETOOL 8 Fri Oct 07, 2016 9:52 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us