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

File transfer issue with end of line characters


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
VINAY PALLELA

New User


Joined: 28 Jan 2018
Posts: 24
Location: India

PostPosted: Thu Nov 14, 2019 12:01 am
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.

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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 14, 2019 1:50 am
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: 917
Location: The Universe

PostPosted: Thu Nov 14, 2019 6:58 am
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: 24
Location: India

PostPosted: Thu Nov 14, 2019 9:34 am
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

Senior Member


Joined: 15 Aug 2015
Posts: 1249
Location: Bamberg, Germany

PostPosted: Fri Nov 15, 2019 12:58 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top