View previous topic :: View next topic
|
Author |
Message |
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
NO!
I just run a simple test and was able to allocate 1000 datasets
IDCAMS ALLOC invokes under the covers TSO ALLOC ( stated in the manual and confirmed by the IKJ**** messages)
if the FI/DDNAME parameter is not specified one will be build according to the dynamic ddnames build rules
so in this case RULE 1 applies ==> too many allocated ddnames
but if as I did You use a construct like
Code: |
ALLOC FI(<always_the_same_ddname>) DA(<dataset_name>) -
<all the allocation parameters> -
REUSE |
the ddname issue for the alloc will no longer exist |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
here is the jcl of a successful test ( ALLOCATE,REPRO,PRINT)
Code: |
****** ***************************** Top of Data ******************************
000001 //IBMUSER1 JOB NOTIFY=&SYSUID,
000002 // MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
000003 //*
000004 //IEB EXEC PGM=IEBGENER
000005 //SYSPRINT DD SYSOUT=*
000006 //SYSIN DD DUMMY
000007 //SYSUT1 DD DATA,DCB=LRECL=80
000008 ONE SIMPLE CARD
000009 /*
000010 //SYSUT2 DD DISP=(NEW,PASS,DELETE),
000011 // UNIT=SYSDA,SPACE=(TRK,(1,1)),
000012 // DCB=(RECFM=FB,LRECL=80)
000013 //*
000014 //AMS EXEC PGM=IDCAMS
000015 //SYSPRINT DD SYSOUT=*
000016 //IN DD DISP=(OLD,PASS),
000017 // DSN=*.IEB.SYSUT2
000018 //SYSIN DD *
000019 DELETE ('IBMUSER.ALLOC.*') NONVSAM PURGE
000020 SET LASTCC = 0
000021 DELETE ('IBMUSER.ALL.*') NONVSAM PURGE
000022 SET LASTCC = 0
000023 SET MAXCC = 0
000024 ALLOC FI(OU) DA('IBMUSER.ALL.T0001') -
000025 DSORG(PS) RECFM(F B) LRECL(80) -
000026 SPACE(1 1) TRACKS NEW CATALOG REUSE
000027 REPRO INFILE(IN) OUTFILE(OU)
000028 PRINT INFILE(OU)
000029 ALLOC FI(OU) DA('IBMUSER.ALL.T0002') -
000030 DSORG(PS) RECFM(F B) LRECL(80) -
000031 SPACE(1 1) TRACKS NEW CATALOG REUSE
000032 REPRO INFILE(IN) OUTFILE(OU)
000033 PRINT INFILE(OU)
000034 ALLOC FI(OU) DA('IBMUSER.ALL.T0003') -
000035 DSORG(PS) RECFM(F B) LRECL(80) -
000036 SPACE(1 1) TRACKS NEW CATALOG REUSE
000037 REPRO INFILE(IN) OUTFILE(OU)
000038 PRINT INFILE(OU)
......
......
......
005019 ALLOC FI(OU) DA('IBMUSER.ALL.T1000') -
005020 DSORG(PS) RECFM(F B) LRECL(80) -
005021 SPACE(1 1) TRACKS NEW CATALOG REUSE
005022 REPRO INFILE(IN) OUTFILE(OU)
005023 PRINT INFILE(OU)
****** **************************** Bottom of Data ****************************
|
the elapsed time was just about 5 minutes... seems a long elapsed for a stupid job ,
but allocation and catalog management are pretty expensive in terms of resources
and for everybodys benefit the ISPF macro I used to avoid useless typing
Code: |
****** ***************************** Top of Data ******************************
000001 /* REXX */
000002 call $ispex "CONTROL ERRORS RETURN"
000003 if $isred("MACRO (ZPARMS) NOPROCESS ") = 0 then do
000004 count = strip(translate(zparms))
000005 if count = "" then ,
000006 count = 100
000007 end
000008 else do
000009 exit 99
000010 end
000011
000012 do i = 1 to count
000013 dsname = "'IBMUSER.ALL.T" || right(i,4,'0') || "'"
000014 cmd1 = " ALLOC FI(OU) DA(" || dsname || ") -"
000015 cmd2 = " DSORG(PS) RECFM(F B) LRECL(80) - "
000016 cmd3 = " SPACE(1 1) TRACKS NEW CATALOG REUSE"
000017 cmd4 = " REPRO INFILE(IN) OUTFILE(OU)"
000018 cmd5 = " PRINT INFILE(OU)"
000019 call $isred "LINE_AFTER .zlast = (CMD1)"
000020 call $isred "LINE_AFTER .zlast = (CMD2)"
000021 call $isred "LINE_AFTER .zlast = (CMD3)"
000022 call $isred "LINE_AFTER .zlast = (CMD4)"
000023 call $isred "LINE_AFTER .zlast = (CMD5)"
000024 end
000025 exit
000026 /* */
000027 $tsoex:
000028 Address TSO arg(1)
000029 tso_0rc = RC
000030 return tso_0rc
000031 /* */
000032 $ispex:
000033 Address ISPEXEC arg(1)
000034 isp_0rc = RC
000035 return isp_0rc
000036 /* */
000037 $isred:
000038 Address ISREDIT arg(1)
000039 isr_0rc = RC
000040 return isr_0rc
****** **************************** Bottom of Data ****************************
|
|
|
Back to top |
|
|
mlp
New User
Joined: 23 Sep 2005 Posts: 91
|
|
|
|
Only difference in your and mine ALLOC statement is that, I did not use REUSE parameter. I used that parameter but nothing happened. The issue still persists.
Also you did not used the DYNAMNBR option. Still you were able to execute 1000 allocations. I also tried with JCL without DYNAMNBR option. But it failed on 3rd instance of allocation. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you speak with your system support people and learn how your limits have been defined. . .
I still have no idea why someone believes it is acceptable to allocate 3000+ datasets for one task. . .
If you explain why this is being done, someone may have an alternative suggestion. |
|
Back to top |
|
|
mlp
New User
Joined: 23 Sep 2005 Posts: 91
|
|
|
|
For a certain assignment I need to create datasets in this volume. Also the names of the datasets are going to be decided run time with certain variable values. This proces is going to be repeated on weekly/monthly basis. Also some of the datasets need to be prefilled with some content.
I have written a COBOL prog to create a control card which is then fed to IDCAMS step which is actually creating and filling the datasets with soem content.
I want to do this process in one shot, becuase there might be the case I need to allocate more than 3000 datasets. At that point of time I dont want run my job again and again so that all allocations are done.
Please suggest if there is any good solution for this. |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
hi,
have you tried using CALL "SETENV". I think dynamic file allocation can be done thru this method also in cobol programmes.
Just posted this, as it might of some interest/help to you. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
the major difference is that I used the FI(OU) parameter in order not to hit the DDNAME limit!
the REUSE is forced by the FI(OU) .
I gave You a tested solution!
why don' t You try to run MY jcl to see what happens
the trick is the FI parameter
without it I also got the error after a few datasets. |
|
Back to top |
|
|
mlp
New User
Joined: 23 Sep 2005 Posts: 91
|
|
|
|
The trick worked !!
I did not get any error with FI parameter. Also I did not specify DYNAMNBR option in my jcl step.
Thanks a lot Enrico... |
|
Back to top |
|
|
mlp
New User
Joined: 23 Sep 2005 Posts: 91
|
|
|
|
I have came to know that one program/ programatic interface BPXWDYN can actually do the dynamic allocations and uses TSO like commands. This program is callable thru COBOL programs. BPXWDYN supports data set allocation, unallocation, concatenation, the retrieval of certain allocation information, and the addition and deletion of output descriptors. Below is description what I found on IBM site.
The syntax for allocation is quite similar to that of TSO for the TSO ALLOCATE and FREE commands. It should be possible to provide parameters to BPXWDYN that would be acceptable as a TSO ALLOCATE or FREE command. However, there are keys supported by TSO ALLOCATE that are not currently supported by BPXWDYN. There are also some keys that can be used with BPXWDYN which are not compatible with TSO. |
|
Back to top |
|
|
|