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

How to find CR/LF in a sequential file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 06, 2013 4:49 pm
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
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

Global Moderator


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

PostPosted: Thu Jun 06, 2013 8:08 pm
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
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

Moderator Emeritus


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

PostPosted: Tue Jun 11, 2013 7:03 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top