Vsam tips

1) copy vsam to flat file
2) then process the flat file in subsequent steps
3) some times vsam is empty
4) when it is empty job abends

//step3      exec   pgm=sort,parm='vsamemt=yes'
//sysout    dd      sysout=*
//sortin     dd      dsn=vsam.dsn,disp=shr
//sortout   dd      dsn=flatfile.dsn,disp=shr
//sysin      dd      *
    sortfields = copy
//*

2) how should be vsam file defined that it can be accessed both in cics and in batch

    define shareoption(2,3)

3) vsam equivalent of tempdataset is to create vsam file with re-use option.
     a dataset created with re-use can be treated as new dataset at any subsequent time.

4)vsam dataset - read only
    //step1        exec pgm=idcams
    //sysprint   dd    sysout=*
   //sysin         dd    *
      alter -
      secret.ksds.data  -
      inhibit
      alter  -
      secret.ksds.index-
      inhibit
   //*


5) how can i specify dummy vsam dataset in JCL
   
    //step1  dd dummy,AMP='AMORG'  -- tels the OS to treat the file as VSAM
   

6) define path creates an alias for VSAM datasets
    define alias creates an alias for non-vsam dsn


7) idcams can be executed with out sysprint and sysin dd statements

8) one can speed up applications greatly by using memory cuuting down I/O
    In dd statements code AMP parameters = BUFNI(index)  ----- random access
                                                                        BUFND(data)   ---- sequential access
         BUFSP(amount of virtual storage)

9) cOMP for numeric data and comp-3 for decimal data

10) fOR ksds & RRDs when delete statement is used file must be opened in I-o mode

11) one can generate a complete listing of compiler daignostic messages by using ERRMSG in the program-id.

12) using open output to load vsam will significantly improve the performance of your program  using open i-o and extend will have negative importance

13) how cobol compiler gets to know that file is vsam or not
      by using the organization clause hence organization cluase cannot be coded for non-vsam datasets


Comments

Popular posts from this blog

Date/time constants in JCL

JCL ABeND --

IEBGENER usage examples