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
 

 

VSAM varible block record length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vinit_infy
Warnings : 1

New User


Joined: 07 Apr 2005
Posts: 56

PostPosted: Sat Jun 19, 2010 1:34 pm    Post subject: VSAM varible block record length
Reply with quote

I am reading a VSAM file having variable length data and writing the same to VB sequential file if the record satisfies some particular condition.
Could any one tell me how can i get the length of each record from the VSAM file so that i can write the VB sequential file?
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Sat Jun 19, 2010 1:48 pm    Post subject:
Reply with quote

IDCAMS LISTCAT will give that information.
Back to top
View user's profile Send private message
vinit_infy
Warnings : 1

New User


Joined: 07 Apr 2005
Posts: 56

PostPosted: Sat Jun 19, 2010 1:52 pm    Post subject:
Reply with quote

Peter, I am asking in terms of COBOL ...how can i calculate the length in cobol program? Pls advise.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Jun 19, 2010 2:06 pm    Post subject:
Reply with quote

Why do you need to know the length of a record to be able to write it out to a VB file.
Back to top
View user's profile Send private message
vinit_infy
Warnings : 1

New User


Joined: 07 Apr 2005
Posts: 56

PostPosted: Sat Jun 19, 2010 2:09 pm    Post subject:
Reply with quote

because i dont want to have spaces or anything in last positions.. e.g., The maximum length is 4096 and if the record in vsam has length of 1000 , i dont want spaces in last 3096 places....and i think for writing Variable block file we have to pass the record length first..pls correct if i am wrong...
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Sat Jun 19, 2010 2:20 pm    Post subject:
Reply with quote

Hi,

From one of Bill O'Boyle's posts...

Quote:
After the introduction of COBOL2, version 3, you could specify -

RECORD IS VARYING IN SIZE FROM Minimum-Length TO Maximum-Length CHARACTERS DEPENDING ON WS-REC-LGTH.

03 WS-REC-LGTH PIC 9(08) BINARY.

Where WS-REC-LGTH in an unsigned WS variable. Personally, I always specify this as an unsigned binary-fullword, but it's not a mandate.

On a READ of a variable-length record, WS-REC-LGTH will contain the actual length.

On a WRITE (and before it is issued), the programmer would populate WS-REC-LGTH with the desired record-length.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Sat Jun 19, 2010 2:28 pm    Post subject:
Reply with quote

Using the following clauses could do the job :

RECORDING MODE is V
RECORD is VARYING in SIZE from 1 to x
DEPENDING ON RECORD-SIZE.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
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 SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am


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