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 N number of datasets

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

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Wed Dec 07, 2005 10:31 am    Post subject: Creating N number of datasets
Reply with quote

Hi Team,

Can anyone give an idea of how to allocate N number of datasets using a single JCL


eg:

if i want to create

TEMP.TEMP.DATE01
TEMP.TEMP.DATE02
TEMP.TEMP.DATE03
TEMP.TEMP.DATE04

like this UPTO DATE10. not using GDG.......

Moderator please delete this topic in VS COBOL II
Back to top
View user's profile Send private message

radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Wed Dec 07, 2005 10:41 am    Post subject:
Reply with quote

Use IEFBR14
Code:
//SHAA5   EXEC PGM=IEFBR14, 
//             COND=(4,LT)   

//SHZ51       DD  DSN=TEMP.TEMP.DATE01,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(TRK,(5,2),RLSE),   
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)   
//*                                                 
//SHZ52       DD  DSN=TEMP.TEMP.DATE02,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(TRK,(5,2),RLSE),   
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)   
//*                                                 
//SHZ53       DD  DSN=TEMP.TEMP.DATE03,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(TRK,(5,2),RLSE),   
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)   
//*                                                 
//SHZ54       DD  DSN=TEMP.TEMP.DATE04,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(TRK,(5,2),RLSE),   
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)   
//*                                                 
.
...
..
..
.
.
//SHZ10       DD  DSN=TEMP.TEMP.DATE10,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(TRK,(5,2),RLSE),   
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)   
//*


hope this helps.
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Wed Dec 07, 2005 11:57 am    Post subject:
Reply with quote

hi Radhakrishnan,


Thanks for the help....but i meant for creating Temporary datasets...if its for a 100 or 500 datasets ??? how to create using the same.....
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Wed Dec 07, 2005 12:50 pm    Post subject:
Reply with quote

It can be done using REXX.
Back to top
View user's profile Send private message
yogesh

New User


Joined: 27 May 2005
Posts: 21

PostPosted: Wed Dec 07, 2005 4:54 pm    Post subject:
Reply with quote

If u r making the temp d/s , u need not have to use any utility
just use dd statement with &&prefixed
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Wed Dec 07, 2005 6:54 pm    Post subject: Re: Creating N number of datasets
Reply with quote

Use IDCAMS:
Code:

//ALLOC    EXEC PGM=IDCAMS,DYNAMNBR=255
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
   DELETE ('TEMP.TEMP.DATE01')
   ALLOC DATASET('TEMP.TEMP.DATE01') -
     NEW CATALOG UNIT(unit) SPACE(pri,sec) CYLINDERS -
     RECFM(recfm) LRECL(lrecl) BLKSIZE(0)
   ...
   DELETE ('TEMP.TEMP.DATE0n')
   ALLOC DATASET('TEMP.TEMP.DATE0n') -
     NEW CATALOG UNIT(unit) SPACE(pri,sec) CYLINDERS -
     RECFM(recfm) LRECL(lrecl) BLKSIZE(0)
   IF MAXCC > 0 THEN SET MAXCC=0 
/*
//*
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon Dec 12, 2005 6:13 pm    Post subject:
Reply with quote

hey superk

Thank you so much for the info
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 309
Location: Vizag / US

PostPosted: Fri Mar 03, 2006 10:22 pm    Post subject: Re: Creating N number of datasets
Reply with quote

Hi superk,

The code given by above, i tried it but it is creating only 2 datasets.
The first one and the last one.

Can u clarify me regarding this....

thanks in advance
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Sat Mar 04, 2006 12:11 am    Post subject: Re: Creating N number of datasets
Reply with quote

You'll probably need to post your messages.

I just tried it with 9 sets of DELETE/ALLOCATE commands and it worked just fine.
Back to top
View user's profile Send private message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Mon Mar 06, 2006 3:31 pm    Post subject:
Reply with quote

Hi, Gautam..

u have to code it for N number of times..not that the above code creates N no of data sets :-).

Superk am i rite?
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 309
Location: Vizag / US

PostPosted: Mon Mar 06, 2006 6:25 pm    Post subject: Re: Creating N number of datasets
Reply with quote

Hi superk,

here is the sysin card :

Code:
ALLOC DATASET('CC923GB.TSOAREL.TEMP01') -       
  NEW CATALOG UNIT(PRMDA) SPACE(1,0) CYLINDERS -
  RECFM(F) LRECL(133) BLKSIZE(0)               
...                                             
ALLOC DATASET('CC923GB.TSOAREL.TEMP05') -       
  NEW CATALOG UNIT(PRMDA) SPACE(1,0) CYLINDERS -
  RECFM(F) LRECL(133) BLKSIZE(0)               
IF MAXCC > 0 THEN SET MAXCC=0 


the three dots mentioned will be taken by the jcl automatically or we need to give all the dataset names.....

Thanks in advance
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Mar 07, 2006 7:38 am    Post subject: Re: Creating N number of datasets
Reply with quote

Gautam512 wrote:
...the three dots mentioned will be taken by the jcl automatically or we need to give all the dataset names.....

We need to give all the dataset names, of course.
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Fri Apr 25, 2008 3:24 pm    Post subject:
Reply with quote

Hi Nirmal,

Here is a small cobol program and JCL for creating N no of dataset. I have tested with 10 dataset. Its working fine for me... U can also try it

WORKING-STORAGE SECTION.
01 WS-COUNT PIC 9(2) VALUE ZEROES.
PROCEDURE DIVISION.
PERFORM XXXX-XXXX VARYING
WS-COUNT FROM 1 BY 1 UNTIL WS-COUNT > 5(No of Dataset).
STOP RUN.

XXXX-XXXX.
DISPLAY '//<ID> JOB CLASS=B,'
DISPLAY '// MSGCLASS=X,NOTIFY=&SYSUID
DISPLAY '//DSNCREAT EXEC PGM=IEBGENER'
DISPLAY '//SYSUT2 DD DSN=AISSTMP.MILN.P' WS-COUNT ','
DISPLAY '// DISP=(NEW,CATLG,DELETE),'
DISPLAY '// DCB=(LRECL=80,RECFM=FB,BLKSIZE=0,DSORG=PS),'
DISPLAY '// SPACE=(TRK,(09,03),RLSE),'
DISPLAY '// UNIT=SYSDA'
DISPLAY '//SYSPRINT DD SYSOUT=*'
DISPLAY '//SYSOUT DD SYSOUT=*'
DISPLAY '//SYSIN DD DUMMY'
DISPLAY '//SYSUT1 DD DSN=AISSTMP.MILN.D01,DISP=SHR'
DISPLAY '//'.

JCL Structure:

//<ID> JOB CLASS=B,
// MSGCLASS=X,NOTIFY=&SYSUID
//* $ACFJ219 ACF2 ACTIVE GFSJES04
//* $ACFJ219 ACF2 ACTIVE GFSJES04
//MAILRPT EXEC PGM=DSNCRE
//STEPLIB DD DSN=AISSTMP.NGPT.LOADLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=(*,INTRDR)
//SYSIN DD DUMMY
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Apr 25, 2008 3:29 pm    Post subject: Reply to: Creating N number of datasets
Reply with quote

Why reply to a 2 year old topic

which by the way was not clear at all in its requirement
( total confusion on permanent temporary concept )
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 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 Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts how to mask the phone number kumarinfy DB2 4 Mon Apr 03, 2017 5:23 pm


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