View previous topic :: View next topic
|
Author |
Message |
mbattu
New User
Joined: 19 Jan 2011 Posts: 15 Location: Toronto
|
|
|
|
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Look up how to code the "LOCSITE" command. It sounds as if you want to specify LOCSITE SBSENDEOL = NONE. |
|
Back to top |
|
|
mbattu
New User
Joined: 19 Jan 2011 Posts: 15 Location: Toronto
|
|
|
|
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 |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mbattu
New User
Joined: 19 Jan 2011 Posts: 15 Location: Toronto
|
|
|
|
Thanks Goodman, it worked. |
|
Back to top |
|
|
|