Page 1 of 1

VSAM Tips.

Posted: Fri May 24, 2013 11:13 pm
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.


Re: VSAM Tips.

Posted: Tue May 28, 2013 8:46 pm
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’

Re: VSAM Tips.

Posted: Wed May 29, 2013 11:58 pm
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.

Re: VSAM Tips.

Posted: Thu Jun 06, 2013 9:18 pm
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.

Re: VSAM Tips.

Posted: Tue Aug 20, 2013 6:47 pm
by Anuj Dhawan
5. IDCAMS Utility can't be executed without the SYSPRINT and SYSIN DD names.

Re: VSAM Tips.

Posted: Thu Sep 05, 2013 10:12 am
by Neeraj N
Quite a good number of tips, Thanks for sharing them.

Regards,
Neeraj

Re: VSAM Tips.

Posted: Thu Sep 05, 2013 12:32 pm
by Anuj Dhawan
Thanks for the feedback Neeraj - glad, you find them helpful.

Regards,

Re: VSAM Tips.

Posted: Thu Oct 03, 2013 7:42 pm
by Kapil Sharma
Thanks for the tip no. 3, I just used it. :)

Re: VSAM Tips.

Posted: Thu Oct 03, 2013 8:02 pm
by Anuj Dhawan
Great - nice to know that! :)

Regards,

Re: VSAM Tips.

Posted: Sun Nov 17, 2013 12:01 pm
by Anuj Dhawan
6. Advice: One should remove Catalog Orphans from the Catalog, (if you're in the capacity of doing it).

Re: VSAM Tips.

Posted: Wed Nov 20, 2013 3:43 pm
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.

Re: VSAM Tips.

Posted: Wed Nov 20, 2013 3:48 pm
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.