Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
File transfer issue with end of line characters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
VINAY PALLELA

New User


Joined: 28 Jan 2018
Posts: 9
Location: India

PostPosted: Thu Nov 14, 2019 12:01 am    Post subject: File transfer issue with end of line characters
Reply with quote

Hi,

Please help me, if there is a way to fix the below issue with file transfer end of line character through NAS step in JCL.

Issue: When i place a file from Mainframe to windows folder( Mainframe PS dataset to .TXT file). I see the file is having end of line characters as LF (LINE FEEDER). BIZTALK will pick the file but they are not able to process the file as BIZTALK is expecting end of line as CRLF.

Is there a way to place the file with CRLF end of line with PARM options.

I have gone through the documentation from the below link but did not find the solution.

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxa500/tsoocopy.htm

Below is the PARM i am using in NAS STEP.

Code:
****** ***************************** Top of Data ******************************
000001   OCOPY INDD(INPMVS1) OUTDD(OUTNAS1) TEXT PATHOPTS(USE)
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Thu Nov 14, 2019 1:50 am    Post subject: Reply to: File transfer issue with end of line characters
Reply with quote

You've got a flawed process. OCOPY works between z/OS Unix System Services and z/OS -- which means line terminators are going to be the Unix standard LF. The standard and usual way to get CRLF line terminators is to use FTP to transfer the data set from z/OS to a Windows file as text (which will use CRLF by default, or it can be specified as one of the FTP options). As long as you stick with OCOPY, you're not going to see Windows line terminators.
Back to top
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Thu Nov 14, 2019 6:58 am    Post subject:
Reply with quote

Mr. Sample is correct. You are not going to see Windoze style line terminals in the regular z/OS data set - which does not use line terminators at all - or in the output file created by the OCOPY command. It will have the EBCDIC version of the Unix style line terminator. Similarly, if you were able to look at the data sent by z/OS FTP to Windoze, you will not see Windoze style line terminator characters as the FTP standard is to send Unix style line terminator characters. The Windoze FTP inserts Windoze style line terminator characters in place of the Unix style line as it buids the Windoze file when it receives the data.
Back to top
View user's profile Send private message
VINAY PALLELA

New User


Joined: 28 Jan 2018
Posts: 9
Location: India

PostPosted: Thu Nov 14, 2019 9:34 am    Post subject: Reply to: File transfer issue with end of line characters
Reply with quote

Thank you for taking time to look into my query and respond.

I faced same issue in my previous project and learnt that Windows expect CRLF line terminator and UNIX expects LF line terminators. In my tests i found no issue with FTP but is see the issue with OCOPY. I explained this to my project lead, our Mainframe NASPATH is on UNIX directory, it autopads the line terminators as LF in text file. But my lead was insisting to find the solution with OCOPY and he believes definitely there should be a way with OCOPY options.
Cyclone team fixed the issue, cyclone picks the file from Mainframe NASpath(UNIX) and replace the line terminators as needed and placed the file in Windows sever.

I was told there is standard in our project to use NASPATH for internal file transfers and SFTP for file transfers outside Organization.

I got better understanding now and i can speak to my project lead.

Thanks again!
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 59
Location: Germany

PostPosted: Fri Nov 15, 2019 12:58 am    Post subject:
Reply with quote

FTP is more flexible than OCOPY, basically everything can be done. There is even a special setting for CRLF translations but you might have found that already.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - Special characters are converte... Chinnadu TSO/ISPF 2 Tue Nov 12, 2019 6:01 pm
No new posts File compare, where file has header a... VINAY PALLELA SYNCSORT 8 Thu Nov 07, 2019 5:05 pm
No new posts OMIT first and last column of a pipe-... karthikb_itpro DFSORT/ICETOOL 1 Fri Nov 01, 2019 8:24 pm
No new posts How to place name of the file where t... danielgp89 SYNCSORT 18 Thu Oct 17, 2019 12:55 am
No new posts Need help in parsing record in VBA file guptae DFSORT/ICETOOL 4 Fri Oct 11, 2019 2:31 pm

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