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 LRECL of Variable block Record

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

New User


Joined: 27 Feb 2006
Posts: 3
Location: pune

PostPosted: Wed Jul 18, 2007 2:21 pm    Post subject: How to find LRECL of Variable block Record
Reply with quote

In a cobol program i want to read the length of the VB record before processing it. The first two bytes of a VB file is the length of the record. How do i read first two bytes.
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: Wed Jul 18, 2007 2:39 pm    Post subject: Re: How to find LRECL of Variable block Record
Reply with quote

See this previous topic.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jul 18, 2007 2:52 pm    Post subject:
Reply with quote

As far as I can tell, the FM says that "These control fields in the buffer are not available for you to use in your program."

Is there an echo in here?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Jul 23, 2007 12:49 am    Post subject:
Reply with quote

Hi Narendar,

If you're still out there, or for posterity:

If you use "VARYING FROM 1 TO your-max-rec-length DEPENDING ON WS-REC-LEN" in the FD, where WS-REC-LEN is PIC 9(004), it will contain the length of the variable rec just read.

If you want to WRITE a rec to a vriable length file do the same thing but MOVE the desired len of the rec to WS-REC-LEN before you issue the WRITE.
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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am


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