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

VSAM Definition Without using IDCAMS


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

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Aug 07, 2007 10:23 pm
Reply with quote

I know I can define a VSAM without using IDCAMS and a control card. I want to do this so I can reuse code instead of creating 72 control cards (6 VSAMs with 4 promote levels across 3 Lines of business). If I can define the VSAM using the following JCL, using the &PARM syntax that we can use in a proc I only need one proc w/ parameters for each of the 6 VSAMs. My problem here is that I need to specify SHAREOPTION(2 3). I am am trying to convince my tech support to define a DATACLAS that I can use with those parameters, but they are reluctant. If I can't get them to do this, does anyone know the paramteter I need to code to get that SHAREOPTION? The JCL works but defines (1 3).

Code:

//JOBCARD
//*
//STEPDEF1 EXEC  PGM=IEFBR14                             
//VKSDS1 DD DSN=MY.FILE.S015.TESTVS,DISP=(,CATLG,DELETE),   
//          SPACE=(CYL,(100,50)),LRECL=406,KEYOFF=0,     
//          KEYLEN=85,RECORG=KS,VOL=(,,,10),UNIT=DISK


I tried the following but they all failed a jcl check.
Code:

SHARE=(2 3)
SHARE=(2,3)
SHAREOPTS(2 3)
SHAREOPTS(2,3)
SHAREOPTIONS(2 3)
SHAREOPTIONS(2,3)
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Aug 07, 2007 10:29 pm
Reply with quote

Well, you could define the cluster once and then use the MODEL parameter to define the rest of them.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Aug 07, 2007 10:58 pm
Reply with quote

But using a model, I still would need one control card for each file and I still have 72 control cards.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 08, 2007 4:02 am
Reply with quote

Hello,

What about creating a single process (a bit of code and associated jcl) that would that would generate jcl and idcams and/or other control statements and submit them thru the internal reader to run in the appropriate environment? The particulars could be "canned" or entered as the process is used.

It could be written in rexx, cobol, or whatever.

Just a thought. . .
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Aug 08, 2007 4:53 am
Reply with quote

Dick,

That is what I would like to do, but time constraints on the project with the workload I have for it are too tight. And, like anywhere, once the project is implemented we don't go back to improve things unless they are broke.

-Steve
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 08, 2007 5:11 am
Reply with quote

Hi Steve,

Yup, see that all too often. . . icon_confused.gif

Dick
Back to top
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Wed Aug 08, 2007 11:54 am
Reply with quote

Why are your Storage Admin reluctant to create a DATACLAS that has the correct share options?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Aug 08, 2007 12:49 pm
Reply with quote

I'd guess us storage guys are like any others, some are great and some are bone idle. Luck of the draw on who you get.

Once the first cluster is defined, all you need to code is

DEFINE CLUSTER(NAME(CLUSTER NAME) MODEL(ANOTHER NAME))
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Aug 08, 2007 6:58 pm
Reply with quote

expat: that uses IDCAMS, like Dick said, the ideal way is to use a some process to generate the jcl and control card on the flay but no time no time....

We have a model cluster but are heavily discouraged from using it because people forget to define the actual needs of the VSAM and just assume they can all use what the model has. And... I can't use a model without IDCAMS.

I got approval from everyone I could and support before sending it to our storage admin area yesterday, I'm still waiting to hear back.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 08, 2007 7:10 pm
Reply with quote

We'll keep our fingers crossed (kinda like "Use the Force") icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Aug 08, 2007 7:49 pm
Reply with quote

What I meant was something like this
Code:

//DEFINE1  EXEC PGM=IDCAMS                                         
//SYSPRINT DD SYSOUT=*                                             
//SYSIN    DD *                                                     
 DEFINE CLUSTER(NAME('hlq1.VSAM1') INDEXED KEYS(12 0) TRACKS(1 1) -
 blah blah blah -
 other attributes )
/*                                                                 
//*                                                                 
//DEFINE2  EXEC PGM=IDCAMS                                         
//SYSPRINT DD SYSOUT=*                                             
//SYSIN    DD *                                                     
 DEFINE CLUSTER(NAME('hlq2.VSAM1') MODEL('hlq1.VSAM1'))     
 DEFINE CLUSTER(NAME('hlq3.VSAM1') MODEL('hlq1.VSAM1'))
 DEFINE CLUSTER(NAME('hlq4.VSAM1') MODEL('hlq1.VSAM1'))
/*


Not sure if you can use the LIKE parameter for VSAM, might be worth a go.

Code:

//STEPDEF1 EXEC  PGM=IEFBR14                             
//VKSDS1 DD DSN=MY.FILE.S015.TESTVS,DISP=(,CATLG,DELETE),   
//          LIKE=cluster to be modelled
//VKSDS2 DD DSN=MY.FILE.S016.TESTVS,DISP=(,CATLG,DELETE),   
//          LIKE=cluster to be modelled

Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Aug 09, 2007 5:18 am
Reply with quote

I read up on LIKE, it doesn't catch my shareoptions... gonna bug my storage people again tomorrow.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Aug 09, 2007 7:59 am
Reply with quote

expat wrote:
What I meant was something like this
Code:

//DEFINE1  EXEC PGM=IDCAMS                                         
//SYSPRINT DD SYSOUT=*                                             
//SYSIN    DD *                                                     
 DEFINE CLUSTER(NAME('hlq1.VSAM1') INDEXED KEYS(12 0) TRACKS(1 1) -
 blah blah blah -
 other attributes )
/*                                                                 
//*                                                                 
//DEFINE2  EXEC PGM=IDCAMS                                         
//SYSPRINT DD SYSOUT=*                                             
//SYSIN    DD *                                                     
 DEFINE CLUSTER(NAME('hlq2.VSAM1') MODEL('hlq1.VSAM1'))     
 DEFINE CLUSTER(NAME('hlq3.VSAM1') MODEL('hlq1.VSAM1'))
 DEFINE CLUSTER(NAME('hlq4.VSAM1') MODEL('hlq1.VSAM1'))
/*


Not sure if you can use the LIKE parameter for VSAM, might be worth a go.


Still uses IDCAMS and isn't reusable for any fixed length VSAM anywhere on the system.

I know my plan has some limitations like no alternate indexes, can't handle variable length VSAM, etc... But I like to work easier, not harder.

For a more complete example of what I plan on doing:
Code:

//DELDEFC JOB TTCLNTC,CLASS=B,MSGCLASS=V,         
//         MSGLEVEL=(1,1),REGION=0M                             
//***************************************************************
//RUNPROC EXEC PROC1,   
//             CNTLLIB='OUR.CONTROL.LIB',                 
//             MODEV='LOB.VSAM.CLIENT',           
//             MODES='LOB.FLAT.CLIENT',
//             GEN='+0',
//             PRI='50',
//             SEC='25'
/*                                           


//DELDEFP JOB TTPRODP,CLASS=B,MSGCLASS=V,         
//         MSGLEVEL=(1,1),REGION=0M                             
//***************************************************************
//RUNPROC EXEC PROC1,   
//             CNTLLIB='OUR.CONTROL.LIB',                 
//             MODEV='HLQ.VSAM,           
//             MODES='HLQ.FLAT',
//             GEN='+0',
//             PRI='100',
//             SEC='50'
/*       

//*And so on and so forth


//PROC1 PROC
//***************************************************************
//DELETE EXEC  PGM=IEFBR14                                     
//FILE1  DD DSN= &MODEV..REST.OF.FILENAME.VSMF999D,                               
//       DISP=(MOD,DELETE,DELETE),                             
//       SPACE=(CYL,(1,1))                                     
//***************************************************************
//DEFINE EXEC  PGM=IEFBR14                                     
//VKSDS1 DD DSN=&MODEV..REST.OF.FILENAME.VSMF999D,
//          DISP=(,CATLG,DELETE),           
//          SPACE=(CYL,(&PRI,&SEC)),LRECL=406,KEYOFF=0,             
//          KEYLEN=85,RECORG=KS,VOL=(,,,10)
//*         DATACLAS=(DCSTD)               
//***************************************************************
//RESTORE  EXEC PGM=SORT                                               
//SYSPRINT DD   SYSOUT=*                                               
//SORTIN   DD  DSN=&MODES..BKUP.REST.OF.FILENAME.VSMF999T(&GEN),DISP=SHR   
//SORTOUT  DD  DSN=&MODEV..REST.OF.FILENAME.VSMF999D,DISP=OLD               
//SYSIN    DD  DSN=&CNTLLIB(COPY),DISP=SHR                             
//*                                     
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Aug 09, 2007 11:27 pm
Reply with quote

The main storage guy is on vacation this week. His backup thinks it is a bad idea because then they would have to double the number of dataclasses they maintain. He thinks it is better for us to maintain control cards for all of the vsams for all 4 promote level and 3 lines of business.

GRRRRR, gonna work it from another angle with them I suppose, get my manager involved. So instead of them maintaining twice as many data classes, they would rather we maintain near 1000 of control cards just to define VSAM files....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 10, 2007 1:18 am
Reply with quote

Hello,

If you set up code like what i mentioned previously, i suspect you could write the code in a very few hours. How long will it take to edit/copy/paste/whatever 1000 members and ensure there are no typos?

Quote:
instead of them maintaining twice as many data classes, they would rather we maintain near 1000 of control cards
Of course icon_smile.gif Let's see - they can do nothing or they can do something. Doing nothing means they will make no mistake and they will expend no effort. Wonder which they might choose. . . . What was that phrase - oh, yeah, bone idle. . .

If putting together the code really is out of the question (still my preference so that when things change, only one bit of "stuff" need be modified), you may get a better response from the main storage guy or your management may be able to be convinced that it is a better business soluton to expand the data classes.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Fri Aug 10, 2007 1:32 am
Reply with quote

The project timeline has been pushed out a month so I may now have time to get the proper solution in place.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 10, 2007 1:38 am
Reply with quote

Cool icon_wink.gif
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Aug 21, 2007 9:35 pm
Reply with quote

Query to TECH
Quote:
If these we had this option set in some data classes we have the potential to eliminate 1000's of control cards from the maintenance cycle. My count has now gone up to 96 just for this project for the 6 required VSAMs. If we were to double the number of dataclasses would we be approaching the 96 number I have for control cards for just 6 VSAMs? Would we come close to the 1000's of control cards for fixed length VSAMs with no alternate indexes?


Response
[quote]
New data classes would need to be created.

Comparing the number of data classes we would need to create to the number of control cards you need to create is not logical. There's more involved in creating and maintaining new data classes than control cards.

Yes, you could probably eliminate 1000's of control cards however they would have to be replaced by modification to 1000's of JCL.

If you wish to pursue this further, I suggest this discussion be taken to the management level.
[/code]

I am still reading that as, we don't want to do the work to make your life easier.

Anyway back to writing a program and have it generating dynamic JCL. Writing the code to create the JCL with instream control cards is quite simple, but how would I pass these parms into the COBOL program to create the control card? I remember a discussion before where the inbound limit on a parm was 100 characters. If I have to put it in SYSIN for the program execution, I am no better off than IDCAMS.
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 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 CVDA value for RRDS VSAM dataset. CICS 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Open VSAM File in IMS DC Region - DFS... IMS DB/DC 0
Search our Forums:

Back to Top