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 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: 4650
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 Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm

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