VSAM Tips.

A Mainframe-Tip a Day keeps the bugs away!
Forum rules
All of these Tips/Tuning-suggestions should be tested your own, at your shop, prior to use in Prod.
Post Reply
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

VSAM Tips.

Post by Anuj Dhawan »

1. CICS, DB2, IMS can process records in existing VSAM data-sets but can't create the data-set. Even you can process VSAM data sets in COBOL programs only after you create them with access method services.

Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

2. To specify dummy VSAM dataset in a JCL, Code AMP=’AMORG’ . This parameter tells the OS to treat the file as VSAM file. E.g.:

Code: Select all

//NOVSAMIO DD DUMMY,AMP=’AMORG’
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

3. If you want to make VSAM-data-set read-only, use INHIBIT along with ALTER command:

Code: Select all

//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALTER -
SECRET.KSDS.DATA -
INHIBIT
ALTER -
SECRET.KSDS.INDEX -
INHIBIT
/*
//*
Notice that the ALTER command is used with DATA and INDEX and not with the cluster.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

4. A VSAM data-set created with REUSE can be treated as a new data-set at any subsequent time. In a way, you can say that VSAM equivalent of temp data-set is to create VSAM file with REUSE option.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

5. IDCAMS Utility can't be executed without the SYSPRINT and SYSIN DD names.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Neeraj N
Registered Member
Posts: 54
Joined: Tue Aug 20, 2013 12:49 pm

Re: VSAM Tips.

Post by Neeraj N »

Quite a good number of tips, Thanks for sharing them.

Regards,
Neeraj
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

Thanks for the feedback Neeraj - glad, you find them helpful.

Regards,
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Kapil Sharma
Registered Member
Posts: 52
Joined: Sun Sep 29, 2013 1:46 am
Location: India

Re: VSAM Tips.

Post by Kapil Sharma »

Thanks for the tip no. 3, I just used it. :)
Thanks,
Kapil
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

Great - nice to know that! :)

Regards,
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

6. Advice: One should remove Catalog Orphans from the Catalog, (if you're in the capacity of doing it).
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

7. As an Application Developer (assuming COBOL as the Application language) - for sequential access of VSAM, request more data buffers. For random access, request more index buffers.

One should specify both BUFND and BUFNI when ACCESS IS DYNAMIC.

Avoid coding additional buffers unless your application will run interactively; then code buffers only when response-time problems arise that might be caused by delays in input and output.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: VSAM Tips.

Post by Anuj Dhawan »

8. As a COBOL Application Developer, if you can choose this -for 'best performance', access records sequentially.

Dynamic access is less efficient than sequential access, but more efficient than random access. Random access results in increased EXCPs because VSAM must access the index for each request.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Tip Of the Day.”