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: 4649
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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am


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