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

Can we code the following parameters in VSAM?


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

New User


Joined: 08 Jun 2005
Posts: 27

PostPosted: Mon Oct 01, 2007 10:35 am
Reply with quote

Hi All,

1)Can we code the following parameter in VSAM while declaring the any new VSAM dataset in the JCL?

DISP= (New, Catlg, Delete), DCB parameter, SPACE and other paremeters which are used for flat files(PS).

i.e //DD1 DD DSN=A.B.C,DISP=(NEW,CATLG,DELETE),SPACE=(TRK(1,10),DCB=(LRECL=80,BLKSIZE=0) AND ANY OTHER PARAEMETR

A.B.C IS VSAM DATASET.

As per my knowledgement concerned except Disposition "delete" we can use other combination of Disp and other DCB,Space,etc can't be coded.

Please clarify me as I am little confused with these parameters for PS and VSAM files.


2) Can we use DISP=SHR while writing into the PS files or we can only give DISP=OLD(Mutually exclusive) when writing records into files?

If we give DISP=SHR when writing the files it can be used by others to write. So it doesn't make any sense.

Regards,
Sona.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Oct 01, 2007 10:48 am
Reply with quote

Sheetal,

Quote:
Can we code the following parameter in VSAM while declaring the any new VSAM dataset in the JCL

No. VSAM can be created through IDCAMS or some other utilities. At run time (like PS) we cant create.

Quote:
Can we use DISP=SHR while writing into the PS files or we can only give DISP=OLD(Mutually exclusive) when writing records into files?

Why dont you try and let us know?
Back to top
View user's profile Send private message
sonasheetal

New User


Joined: 08 Jun 2005
Posts: 27

PostPosted: Mon Oct 01, 2007 11:06 am
Reply with quote

Hi Murali,
Thanks for your quick reply.,

If any VSAM dataset is existing can we code Disp=(old,catlg,delete)

becoz we can delete the VSAM only by IDCAMS with DELETE option not the above one. If that is the case Disp=(old,catlg,delete) can be coded?

Regards,
Sona
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Oct 01, 2007 12:13 pm
Reply with quote

Sheetal,

Quote:
If any VSAM dataset is existing can we code Disp=(old,catlg,delete)

On job abend, you can say BYE BYE to VSAM cluster.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Mon Oct 01, 2007 12:44 pm
Reply with quote

Murali,
I am really amazed that a senior member like you gives answers like this.
With all respect, I will suggest you to verify your answer.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Oct 01, 2007 12:55 pm
Reply with quote

Abhijit,

Quote:
I am really amazed that a senior member like you gives answers like this.
With all respect, I will suggest you to verify your answer.

Actually I had implemented DISP=(OLD,DELETE,DELETE) for VSAM twuce after Sheetal's query.

These are two jobs with their output. To my wonder, both the times VSAM (ESDS) got deleted.

First job:

Code:
//SORTSTEP  EXEC PGM=IEFBR14                                           
//ESDSVSAM DD DSN=ISTEST.MOHAN.ESDS.TEST,DISP=(OLD,DELETE,DELETE)     


JESYSMSG:

Code:
IEF236I ALLOC. FOR SORTJCL SORTSTEP                                             
IGD103I SMS ALLOCATED TO DDNAME ESDSVSAM                                       
IEF142I SORTJCL SORTSTEP - STEP WAS EXECUTED - COND CODE 0000                   
IGD105I ISTEST.MOHAN.ESDS.TEST                       DELETED,   DDNAME=ESDSVSAM
******************** >>CDE<< ***************************************************
*                                                                               
* STEPNAME  PGM NAME   COMP  STEP START STEP END  TCB TIME  SRB TIME  ELAPSED  S
*                      CODE   HH.MM.SS  HH.MM.SS  MMM.SS.T  MMM.SS.T  HH.MM.SS 
* SORTSTEP  IEFBR14      00   07.38.42  07.38.42  000.00.0  000.00.0  00.00.00 
*                                                                               
*    DDNAME      EXCPS  DDNAME      EXCPS  DDNAME      EXCPS  DDNAME      EXCPS
*    ESDSVSAM        0                                                         
*                                                                               
********************************************************************************
IEF373I STEP/SORTSTEP/START 2007274.0738                                       
IEF374I STEP/SORTSTEP/STOP  2007274.0738 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
*********** >>CDE<< ************************************************************
*                                                                               
*  JOB NAME   COMP  RDR START  INIT START   JOB START   JOB END    ELAPSED   TCB
*             CODE   HH.MM.SS   HH.MM.SS    HH.MM.SS    HH.MM.SS   HH.MM.SS  MMM
*                                                                               
*  SORTJCL      00   07.38.42   07.38.42    07.38.42    07.38.42   00.00.00  000
*                                                                               
********************************************************************************
IEF375I  JOB/SORTJCL /START 2007274.0738                                       
IEF376I  JOB/SORTJCL /STOP  2007274.0738 CPU    0MIN 00.00SEC SRB    0MIN 00.00S




Second job:

Before running the second job, to make sure I had created VSAM.... I went through 3.4 option.

Code:
//SOMESTEP  EXEC PGM=IEFBR14                     
//ESDSVSAM DD DSN=ISTEST.MURALI.ESDS.TEST,       
//         DISP=(OLD,DELETE,DELETE)               



Code:
IEF236I ALLOC. FOR SORTJCL SOMESTEP                                             
IGD103I SMS ALLOCATED TO DDNAME ESDSVSAM                                       
IEF142I SORTJCL SOMESTEP - STEP WAS EXECUTED - COND CODE 0000                   
IGD105I ISTEST.MURALI.ESDS.TEST                      DELETED,   DDNAME=ESDSVSAM
Back to top
View user's profile Send private message
Amit Yadav

New User


Joined: 20 Sep 2007
Posts: 9
Location: PUNE

PostPosted: Fri Oct 05, 2007 4:29 pm
Reply with quote

can we UNCATALOG to VSAM file?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Oct 05, 2007 5:54 pm
Reply with quote

murmohk1 wrote:
No. VSAM can be created through IDCAMS or some other utilities. At run time (like PS) we cant create.
Wrong.....
For non-SMS: Use the AMP parameter to complete information in an access method control block (ACB) for a VSAM data set
For SMS: Use the RECORG parameter to specify the organization of the records in a new VSAM data set.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Oct 06, 2007 3:03 pm
Reply with quote

Amit Yadav wrote:
can we UNCATALOG to VSAM file?


Yes, but why would you want to ?
Back to top
View user's profile Send private message
Amit Yadav

New User


Joined: 20 Sep 2007
Posts: 9
Location: PUNE

PostPosted: Mon Oct 08, 2007 2:41 pm
Reply with quote

ya thax CICS Guy ... but please tell me how many attributes of DISP i.e NEW, CATALOG , UNCATALOG , KEEP,OLD.....we can use in VSAM.?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Oct 08, 2007 6:31 pm
Reply with quote

VSAM definition can be done thru JCL,
but... before doing it I would ask Your storage support group,
there are many good reasons not to do it and many organizations
do not accept it as a standard

One of the biggest problems of these forums is that most ( almost all )
of the answers are right from a technical point of view but are
almost always wrong because they fail to advise abut:
CHECKING WITH YOUR COMPANY STANDARDS
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Oct 08, 2007 9:34 pm
Reply with quote

Amit Yadav wrote:
ya thax CICS Guy ... but please tell me how many attributes of DISP i.e NEW, CATALOG , UNCATALOG , KEEP,OLD.....we can use in VSAM.?
I don't know, you don't know....
I don't care that I don't know, you do care that you don't know...
Who should be looking at the manual links given above.... icon_confused.gif
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top