Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Creating Multiple GDG base

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Kumar Neeraj

New User


Joined: 10 Aug 2007
Posts: 9
Location: Pune

PostPosted: Sun Aug 12, 2007 7:53 am    Post subject: Creating Multiple GDG base
Reply with quote

//PROCNAME PROC
//GDGCRE01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
//DEFINE GDG (NAME(&ACTCDE.IDS.&MABRV.M0307.IDCM) SCRATCH LIMIT(3)) //
//
// PEND

Hi
Suppose I have described a PROC as above to create GDG base. Now in case of &ACTCDE and &MABRV, I want to have different values which I would be describing in PS (MYFILE.ACTCDE) as below:- (LET US SUPPOSE THERE ARE ONLY 2 ENTRIES IN THE PS)

BHP NL
POR P

Now how to call these values in the step name to create BHP.IDS.NL.M0307.IDCM and POR.IDS.P.M0307.IDCM?
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Sun Aug 12, 2007 8:11 am    Post subject:
Reply with quote

Hello Neeraj and welcome to the forums,

This
Quote:
//DEFINE GDG (NAME(&ACTCDE.IDS.&MABRV.M0307.IDCM) SCRATCH LIMIT(3)) //
//
is invalid.

If it is "input" data (i.e. a control statement), input is not permitted inside a PROC. If it is some sort of JCL, it is not a valid JCL statement. If it is "data" the symbolic parameter may not be used to determine the value at runtime.

You will need to think of another approach.
Back to top
View user's profile Send private message
Kumar Neeraj

New User


Joined: 10 Aug 2007
Posts: 9
Location: Pune

PostPosted: Sun Aug 12, 2007 8:30 am    Post subject: Re: Creating Multiple GDG base
Reply with quote

Thanks!!!

Like my requirement is to create a generic job that would create multiple GDG base....Now the naming convention of the GDG depends upon these 2 parameters...so I thought of putting them into a file and calling them in the job.
Can you advice me any approach to this?
Can REXX be used?
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sun Aug 12, 2007 8:37 am    Post subject:
Reply with quote

You're welcome icon_smile.gif

You could use rexx or cobol or other methods as well.

You would read your parameters and "fill in" the nodes of the dataset names, creating the DEFINE statements in a sequential dataset.

Once your process builds the control statements, an IDCAMS step could read them and actually create the gdg base entries you want to create.
Back to top
View user's profile Send private message
Kumar Neeraj

New User


Joined: 10 Aug 2007
Posts: 9
Location: Pune

PostPosted: Mon Aug 13, 2007 12:57 am    Post subject:
Reply with quote

Thanks a lot icon_smile.gif

I would definately let u know once that has been done
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Aug 13, 2007 2:03 am    Post subject:
Reply with quote

Good luck icon_smile.gif

We're here if there are questions.
Back to top
View user's profile Send private message
Kumar Neeraj

New User


Joined: 10 Aug 2007
Posts: 9
Location: Pune

PostPosted: Fri Aug 17, 2007 3:11 am    Post subject:
Reply with quote

Hi Dick,

Since I dont have much knowledge in REXX I decided to do it through this JCL itself.

Can you explain me what is the problem if I describe a symbolic variable in the DD name in the PROC and then call some values from a PS to generate the required GDG name?

If it is feasible can you suggest how to call the data from the PS in the job in place of those symbolic variables.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Aug 17, 2007 3:59 am    Post subject:
Reply with quote

Hello Neeraj,

If you post what you want to do (that is different from the original info posted), we can offfer suggestions on how you could proceed.

Please show what you have and what you want for output.

Keep in mind that it may be much easier and more flexible if you write a small COBOL program to do what you need.

I'll try to check back later tonight.
Back to top
View user's profile Send private message
Kumar Neeraj

New User


Joined: 10 Aug 2007
Posts: 9
Location: Pune

PostPosted: Fri Aug 17, 2007 4:20 am    Post subject:
Reply with quote

Hi Dick,

Actually I need to create multiple GDG bases. For example:-

BHP.IDS.NL.M0307.IDCM
POR.IDS.P.M0307.IDCM

Now here [BHP,NL] and [POR,P] are the identifiers which would always be different for different instances.

Now we have been creating a single GDG base for an instance and repeating that job for different cases.

Now I want to run a generic job which would create all the GDG base for all the instances at one go.

I hope this would make you more clear about the problem. Can you suggest some thing regarding this?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Aug 17, 2007 5:33 am    Post subject:
Reply with quote

Kumar Neeraj wrote:
Now here [BHP,NL] and [POR,P] are the identifiers which would always be different for different instances.


Where are these identifiers determined? Are they being read-in from a file? How are they going to be resolved & passed into an IDCAMS DEFINE process? Why would anyone want to do this in batch?
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Aug 17, 2007 5:47 am    Post subject:
Reply with quote

Hello Neeraj,

Quote:
Can you suggest some thing regarding this?

Yes.

With the editor, create a file or a member in some 80-byte pds that has one record for each of your sets of identifiers
Code:

bhp     nl
por     p
i used fixed length to make the code easier and you would not have to parse the identifiers in the code (you can always make the code more elegant if you want later - after you've proved the concept). In your FD name the fields INP-1 and INP-2 ('cause that's what i used below).

In the working-storage define these fields:
Code:
     01  build-def.
       05 BD-1 pic x(21) value '  //DEFINE GDG (NAME('.
       05 BD-2 pic x(05) value '.IDS.'.   
       05 BD-3 pic x(30) value '.M0307.IDCM) SCRATCH LIMIT(3)).

     01  DEF-CTRL   pic x(80) value spaces.


In the procedure division, STRING the values together creating a complete DEFINE statement
Code:

     MOVE SPACES TO DEF-CTRL.
     STRING BD-1 DELIMITED BY '~'
            INP-1 DELIMITED BY SPACE
            BD-2 DELIMITED BY '~'
            INP-2 DELIMITED BY SPACE
            BD-3 DELIMITED BY '~'
       INTO  DEF-CTRL.
     WRITE DEF-OUT FROM DEF-CTRL.


Once you have written the DEFINE statements to a new file, use that file as input to IDCASMS to actually define the GDGs. Your job woiuld be 1 bit of work with the editor and a 2-step process to create the DEFINEs and use them in IDCAMS.

Good luck icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us