Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
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
 
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: 2445
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: 8615
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: 788
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: 2445
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 query to fetch record which has only ... maxsubrat DB2 4 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us