IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to identify a VSAM file is FB or VB??


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 63
Location: India

PostPosted: Thu Nov 13, 2014 9:06 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu Nov 13, 2014 9:37 pm
Reply with quote

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

CICS Moderator


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

PostPosted: Thu Nov 13, 2014 10:03 pm
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: 1249
Location: Richfield, MN, USA

PostPosted: Fri Nov 14, 2014 12:10 am
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 14, 2014 3:06 am
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: 63
Location: India

PostPosted: Fri Nov 14, 2014 1:03 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Nov 14, 2014 1:14 pm
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: 63
Location: India

PostPosted: Fri Nov 14, 2014 2:47 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Nov 14, 2014 8:46 pm
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: 63
Location: India

PostPosted: Sat Nov 15, 2014 12:07 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top