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 identify a VSAM file is FB or VB??

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

New User


Joined: 01 Jun 2010
Posts: 61
Location: India

PostPosted: Thu Nov 13, 2014 9:06 pm    Post subject: How to identify a VSAM file is FB or VB??
Reply with quote

Hi,

Could anyone please tell how to identify if a VSAM file is FB or VB??

I tried using 'I' and 'S' in ISPF 3.4. But couldn't get the detail. It may be simple but I'm not aware of this. I know RECORDSIZE parameter used when creating VSAM. Once created how to find the same??

I use INSYNC utility to browse on VSAM file.

Thanks,
Arun
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: Thu Nov 13, 2014 9:37 pm    Post subject:
Reply with quote

LISTCAT
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Nov 13, 2014 10:03 pm    Post subject: Reply to: How to identify a VSAM file is FB or VB??
Reply with quote

In the LISTCAT, if keyword RECORDSIZE specifies two different values, such as (256,1024) then the file should be considered variable.

If the file is used in CICS, the FCT entry can specify FIXED or VARIABLE.

HTH....
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Fri Nov 14, 2014 12:10 am    Post subject:
Reply with quote

I was under the impression that VSAM considers ALL files as V length records even when the average and maximum RECORDSIZEs are the same.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 14, 2014 3:06 am    Post subject: Reply to: How to identify a VSAM file is FB or VB??
Reply with quote

Yup, you're correct, Terry....
Back to top
View user's profile Send private message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 61
Location: India

PostPosted: Fri Nov 14, 2014 1:03 pm    Post subject:
Reply with quote

Hi Bill,

Can you please explain me or give me reference for the the below.


Quote:
I was under the impression that VSAM considers ALL files as V length records even when the average and maximum RECORDSIZEs are the same.

Yup, you're correct, Terry....


If so,there is no FB in VSAM?? is it so ??? But DFSORT manuals refer VSAM FB and VSAM VB.


Thanks,
Arun
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Nov 14, 2014 1:14 pm    Post subject: Reply to: How to identify a VSAM file is FB or VB??
Reply with quote

VSAM does one thing internally, but which doesn't apply to the outside world.

In a COBOL program, you don't have variable-length records because the two lengths on the RECORDSIZE are the same. As Mr Bill has pointed out, CICS likes to know. As you have pointed out DFSORT likes to know.

DFSORT documents well how it decides whether to treat VSAM data as fixed-length or variable-length. If that turns up "wrong" for what you want, or just for clarity, you can tell DEFSORT whether to treat any VSAM file as "fixed" or "variable". If your choice is actually illogical for the file, you'll get truncation or padding.

Externally VSAM files can be considered either as "fixed" or "variable" in the manner originally described (do a LISTCAT, look at the RECORDSIZE).

Internally, for instance, VSAM data does not have an "RDW". Yet the records on a particular file could all be different sizes. The DFSORT documentation is a good starting point if you are keen, if you want to get deeper you'll be heading for the VSAM documentation, have a start with the Redbook VSAM Demystified.
Back to top
View user's profile Send private message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 61
Location: India

PostPosted: Fri Nov 14, 2014 2:47 pm    Post subject:
Reply with quote

Thanks for the explanation Bill.

Meanwhile i gone thru one of my old work where I used a VSAM file in SORT step.

When I do LISTCAT the VSAM file I get the below.

Code:
  CLUSTER--SISP.JHS.MAIN.JSD                                             
      ATTRIBUTES                                                               
        KEYLEN----------------16     AVGLRECL-------------100     BUFSPACE------
-----48640     CISIZE--------------4096                                         
        RKP--------------------0     MAXLRECL-------------256     EXCPEXIT------
----(NULL)     CI/CA----------------180                                         
        SHROPTNS(2,3)      SPEED     UNIQUE           NOERASE     INDEXED       
NOWRITECHK     UNORDERED        NOREUSE                                         
        NONSPANNED                 


So, it is VB. (different values in AVGLRECL & MAXLRECL).

But in My SORT card to refer the first eight bytes my control card is

Code:
 JOINKEYS FILE=F1,FIELDS=(01,08,A)     


Here I didnt add +4 for VB.Yet it worked perfect.I also didnt mention if it is FB or VB?? then how actually it proccessed fine??

Then, I also browsed the file using INSYNC utility.

Code:
INSYNC BROWSE - SISP.JHS.MAIN.JSD -------------------------------- COLS 1 - 80
 COMMAND ===>                                                  SCROLL ===> CSR 
    KSDS  RKP 0  KEYLEN 16  LRECL 256 - CAPS ON                                 
 ------------------------------------------------------------------------------
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
----+----F----+----F----+----F----+----F----+----F----+----F----+----F----+----F
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 ------------------------------------------------------------------------------
MSIPFM  ...±.¬ëé>ô.............b.¹â.2R151     .¸.ÙTWSCHED M0000311             
DECDCD44012805556C101121012200083D40FDFFF44444290FEEECCCC4DFFFFFFF             
42976400132F0F31EB386713863400026A2029151000000D0D3623854040000311             
 ------------------------------------------------------------------------------
MSIPFM  ...¬.;I..ÿ.............b.Uâ.2R151     .+.­TWSCHED M0000311             
DECDCD44012505C2FD102111022300083E40FDFFF44444240CEEECCCC4DFFFFFFF             
42976400133F0E90FF38375383370002642029151000002E0A3623854040000311             
 ------------------------------------------------------------------------------   

               


here I couldnt find RDW in first 4 bytes.Data started from first byte itself even it is VB.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Nov 14, 2014 8:46 pm    Post subject: Reply to: How to identify a VSAM file is FB or VB??
Reply with quote

You need to look at the sysout for the step.

You need to look at the RECORD statement in Chapter 3 of the DFSORT Application Programming Guide. This will make clear what is happening, and what to do if you want to change that.
Back to top
View user's profile Send private message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 61
Location: India

PostPosted: Sat Nov 15, 2014 12:07 am    Post subject:
Reply with quote

Hi,
Thanks for all your inputs.From your post and reference this is my understanding.


(1) There is no RDW in any VSAM file.So,actually (internally) in all VSAM files data bytes start from position 1.

(2)Every record's length is stored in RDF.This can be same or different for all records.If it is same we (outside world) call it as FB (VSAM with Fixed length records) otherwise we call is as VB (VSAM with variable length records)

(3)But RRDS VSAM file always with fixed length records (FB).

(4) While processing a VSAM file as input we should mention TYPE parameter to tell DFSORT if the VSAM file needs processing like Fixed lenght records or variable lenght records.

(5) If we didnt specify DFSORT try to get the TYPE from different details (SORTOUT RECFM,OUTFIL RECFM,VTOF FTOF VFILL).Finally if DFSORT cant identity the TYPE by any means it assumes as FB and do processing as FB.

(6) If we specified or DFSORT identified as the is VB we should give proper control cards(+4).

But in my previous work mentioned above,


(1) I didn't mention the input VSAM TYPE as VB to DFSORT.Also DFSORT cant assume it as VB since OUTPUT and other input files are FB.(QSAM)

(2) Also I didn't add +4 in my control card.So, fixed record processing worked fine.


But I believe since I used only the fields within first 20 bytes for my processing it is working perfectly.If I would have used any truncated field in
short record for DFSORT processing it will be padded or truncated.Luckily I escaped. icon_biggrin.gif

Hope all my understandings are good.
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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