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
 

 

How to find CR/LF in a sequential file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Suceender Kumar

New User


Joined: 10 Jan 2008
Posts: 29
Location: Chennai, India

PostPosted: Thu Jun 06, 2013 4:37 pm    Post subject: How to find CR/LF in a sequential file
Reply with quote

Hi,

One of my client reported that the file they received doesn’t have carriage control and Line feed in each line. We use to send a file from Mainframe to PC through “OUTBOUND”. This module may be from our shop.

I tried finding X'0D' or X'0A' in the file with HEX mode on but couldn’t find any. Is there any way to find whether my file has Line feed and Carriage control?

This topic is discussed many times but still I could not find a solution for it. Could you please help me?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Thu Jun 06, 2013 4:49 pm    Post subject:
Reply with quote

If you transfer a file (via FTP) in TEXT format (not BINARY), the system recognizes records and appends the CR/LF as the transmission occurs. The precise characters appended to the record are determined by FTP options (and can be nothing, or LF for Unix systems, or CR/LF for Windows systems). If you are transferring in binary, then you cannot put CR/LF on the end of records since a PC binary file does not have records.

You can either change to using FTP, or you can find out the source of the OUTBOUND program (vendor or internal) and if a vendor program read the documentation to determine how to do the same thing, or if internal contact the support person/team to get it changed.

Carriage control characters would depned upon the RECFM of the original file. If the RECFM is FBA or VBA or FBM or VBM then carriage control would be the first byte of each record (although OUTBOUND could be removing them, of course). If the A or M is missing from the RECFM, then the data set does not have carriage control characters.
Back to top
View user's profile Send private message
Suceender Kumar

New User


Joined: 10 Jan 2008
Posts: 29
Location: Chennai, India

PostPosted: Thu Jun 06, 2013 5:16 pm    Post subject: Reply to: How to find CR/LF in a sequential file
Reply with quote

Thank you Robert! Very useful information. I will post a file using FTP or with A or M in the RECFM with our OUTBOUND and let you know the feedback.
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 Jun 06, 2013 8:08 pm    Post subject: Reply to: How to find CR/LF in a sequential file
Reply with quote

What is the Operating System/Version of the system where you sent the file? If it's a Windows system, does it still have the DOS DEBUG command available? If not, what other software do you use or have available to use for file management on that system that can replace the DEBUG command?
Back to top
View user's profile Send private message
Suceender Kumar

New User


Joined: 10 Jan 2008
Posts: 29
Location: Chennai, India

PostPosted: Tue Jun 11, 2013 10:29 am    Post subject: Reply to: How to find CR/LF in a sequential file
Reply with quote

Apologize for my late reply. PCCRLF(NO) option is present in our OUTBOUND which prevents the carriage return and Line feed character being inserted in every record. I have removed this option and it worked perfectly. Thanks every one for your reply.
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: Tue Jun 11, 2013 7:03 pm    Post subject:
Reply with quote

Thank you for posting your solution icon_smile.gif

d
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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