Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8165
Location: East Dubuque, Illinois, USA

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: 4650
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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