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

How to find the LRECL of the file at run time


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bamohan

New User


Joined: 29 Jan 2007
Posts: 33
Location: chennai

PostPosted: Tue Feb 27, 2007 12:31 pm
Reply with quote

Is there any subroutine for finding the logical record length of the file.? What's the logic on how to find the lrecl of the file at run time?

bala
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Feb 27, 2007 4:37 pm
Reply with quote

Try to get to the JFCLRECL field of the JFCB data area.

O.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Tue Feb 27, 2007 6:10 pm
Reply with quote

Here's a roundabout way:

SAS includes much file info in the SAS log.

1. run a SAS program to read one rec from the file
2. send the SAS log to a file, e.g., &&SASLOG
3. read the SAS log and find the line with the LRECL
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Feb 27, 2007 7:01 pm
Reply with quote

Well, simpler way is to add a REXX step which calls LISTDSI. SYSLRECL will contain the record length.

O.
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 Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 7
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
Search our Forums:

Back to Top