View previous topic :: View next topic
|
Author |
Message |
nirmal.poikaikumaran
New User
Joined: 29 Nov 2005 Posts: 66 Location: Bangalore
|
|
|
|
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 |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
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 |
|
|
nirmal.poikaikumaran
New User
Joined: 29 Nov 2005 Posts: 66 Location: Bangalore
|
|
|
|
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 |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
It can be done using REXX. |
|
Back to top |
|
|
yogesh
New User
Joined: 27 May 2005 Posts: 21
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
nirmal.poikaikumaran
New User
Joined: 29 Nov 2005 Posts: 66 Location: Bangalore
|
|
|
|
hey superk
Thank you so much for the info |
|
Back to top |
|
|
Gautam512
Active User
Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
sonu_winks
New User
Joined: 23 Nov 2005 Posts: 23
|
|
|
|
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 |
|
|
Gautam512
Active User
Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
nelson.pandian
Active User
Joined: 09 Apr 2008 Posts: 133 Location: Phoenix, AZ
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
|
|