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: 8088
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: 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
This topic is locked: you cannot edit posts or make replies. REXX - Dynamic file Creation d_sarlie CLIST & REXX 5 Tue Jun 27, 2017 7:30 pm
No new posts FTP xls file from Mainfrmae kumarsatheeshc1 TSO/ISPF 5 Tue Jun 20, 2017 6:56 pm
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am


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