Hi, We are using Sort in Cobol program, We were using following Sort workspace. Some times we were getting space abends, We were increasing it to 1000 cyl
I tried using following code, job is running fine, But i need to know what is exact number we need to give in dynalloc, I have given 16 here, But need to understand the significance and what else i need to look if i use dynalloc.
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
AFAIK, it is usually recommend not specifying SORTWKdd DD statements, they way SORT can use dynamically allocated work data sets.
Siad that, if you specify SORTWKdd DD statements, SORT will use them and NOT use dynamically allocated work data sets unless your site has set DYNAUTO=IGNWKDD as the installation default. With DYNAUTO=IGNWKDD, SORT deallocates the SORTWKdd DD data sets and use dynamically allocated work data sets.
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
magesh23586 wrote:
I tried using following code, job is running fine, But i need to know what is exact number we need to give in dynalloc, I have given 16 here, But need to understand the significance and what else i need to look if i use dynalloc.
Code:
//DFSPARM DD *
OPTION DYNALLOC=(,16)
/*
Sri Kolusu or Mr. Woodger may be to advise you better. However, the second sub-parameter of DYNALLOC is the number of dynamically-allocated work data sets (the first is the device type, which you'll generally not want to use). The total amount of space is determined by:
The FILSZ and LRECL (for VB input, an average record length of AVGRLEN or, if that is not specified, half the LRECL is assumed); failing that
The DYNSPC parameter (specified in megabytes) in the control deck; failing that
The default that your sysprogs established at installation time
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
I'm not exactly sure what the question is. There is material in the manuals on work dataset allocations.
Did you take out the SORTWKn datasets from the JCL?
Seeing the sysout from a failure and from a success would help if you have something specific for the Cobol programs. Also whether you are using compiler option FASTSRT, and exactly what you have coded related to the SORT/MERGE statements in your Cobol programs.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
magesh23586,
There isn't enough information to suggest anything. Since It is program invoked sort, I am guessing that you aren't passing the FILESIZE. Dynamic allocation is the way to go.
Please Run the following job which will list your shop installation defaults
IF SORT-RETURN NOT EQUAL ZERO
DISPLAY 'SORT FAILED.RETURN CODE = ' SORT-RETURN
DISPLAY 'ABENDING PROGRAM yyyyyyy'
MOVE 'ILBOABN0' TO DYNA
MOVE '2001' TO WS-ABEND-CODE
CALL DYNA USING WS-ABEND-CODE.
Abend
Code:
***********abend*************
SVM4865I CHANGED SPACE FROM 500 CYLS TO 211
SVM4000I YYYYYY, STEP30.YYYYYYY, SORTWK3, ATTEMPTING SPACSECB FOR SYS13049.T2
TEMP76, 3
SVM4868I SPACSEB SPACE REQUEST WENT BELOW LIMIT
SVM4000I YYYYYY, STEP30.YYYYYYY, SORTWK3, ATTEMPTING SPACSECR FOR SYS13049.T2
TEMP76, 3
SVM4001I RECOVERY ATTEMPT FAILED TO PASS FLST/RLST CRITERIA
SVM4000I ZZZZZZ, STEP30.YYYYYYY, SORTWK3, ATTEMPTING SPACVOLA FOR SYS13049.T2
TEMP76, 3
SVM4452I RECOVERY TERMINATED: DATA SET BEING PROCESSED BY EXCP
IEC030I B37-04,IFG0554A,XXXXXX,YYYYYY,SORTWK3,4E3D,TEMP76,E6002130,SYS13049.
+ICE097I 1 XXXXXX .STEP30 SORT RECOVERING FROM B37 ABEND ON SORTWK DATA SET
IOS000I 395D,9A,CMD,E7,0E00,,05020000,TEMP67,YYYYYYY , 637
OPS1370H MSTJCL00 X'5040' X'1001' X'0000' NONE 300 IOS000I 395D, CO
IOS000I 395D, COMMAND REJECT,TEMP67,YYYYYY
800000005D02500400FF004000000004E560A78B01090F04000040E200050200
+AB400A ===== ABEND-AID ===== 641
JOB-ZZZZZZ STEP-YYYYYYY
.SARPAGE 23 DS=SYSOUT .STEP30 .yyyyyyy/0000127
.ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
.ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
.ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 20:07 ON MON FE
. SORT FIELDS=(0009,0046,CH,A)
. RECORD TYPE=F,LENGTH=(000250,,)
.ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1
.ICE118I 0 UNKNOWN FILE SIZE - FILSZ=EN MAY IMPROVE RESOURCE USAGE AND PERFORMAN
.ICE751I 0 C5-K51706 C6-K51706 C7-K51706 C8-K51706 E4-K51706 C9-BASE E5-K51706
.ICE193I 0 ICEAM2 ENVIRONMENT IN EFFECT - ICEAM2 INSTALLATION MODULE SELECTED
.ICE089I 5 ZZZZZZ .STEP30 .YYYYYYY, INPUT LRECL = 250, TYPE = F
.ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)
.ICE156I 0 MAIN STORAGE ABOVE 16MB = (6205590,6205590)
.ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y
.ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ER
.ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT
.ICE130I 0 OPTIONS: RESALL=8192,RESINV=32768,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,
.ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXIT
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAM
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE750I 0 DC 0 TC 0 CS DSVVV KSZ 50 VSZ 50
ICE752I 0 FSZ=0 RE IGN=0 C AVG=256 0 WSP=0 E DYN=0 0
ICE061A 3 I/O ERROR, DD SORTWK4 , DEV 395D, ECB 41, CSW 0E00, SENSE 8000
ICE751I 1 BA-K22788 BB-K44382 D3-K24705 E1-K24705 D6-K24705 E8-K51706
ICE052I 0 END OF DFSORT
SORT FAILED.RETURN CODE = 00016
ABENDING PROGRAM YYYYYYY
CEE3250C The system or user abend U2001 R=00000000 was issued.
From compile unit YYYYYYY at entry point YYYYYYY at compile unit off
at address 189060A0.
<> LEAID ENTERED (LEVEL 08/11/2010 AT 10.57)
<> LEAID PROCESSING COMPLETE. RC=0
ICETOOL Inst
Code:
ITEM JCL (ICEAM1) INV (ICEAM2) TSO (ICEAM3)
---------- -------------------- -------------------- --------------
DSA 64 64 64
DSPSIZE MAX MAX MAX
DYNALOC (SYSDA,4) (SYSDA,4) (SYSDA,4)
DYNAUTO YES YES YES
DYNSPC 256 256 256
MAXLIM 2097152 1048576 1048576
MINLIM 450560 450560 450560
MOSIZE MAX MAX MAX
MSGCON NONE NONE NONE
My Question is
1. May i use Dynalloc in this senario rather than using sortworspace, Will it Fix my problem permenantly.
2. If I can use Dynalloc, i need to know what is the exact number we need to give in dynalloc(,16) or (,32) or ? and what else parameter i should pass to increase the performance.
Temporarily we are fixing it by increasing the workspace from CYL(500,500) to CYL(500,800).
The Result of the successful run after changing to 800 Cyls follows.
Code:
SARPAGE 10 DS=SYSOUT .STEP30 .YYYYYYY/0000113
ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 20:18 ON MON FE
SORT FIELDS=(0009,0046,CH,A)
RECORD TYPE=F,LENGTH=(000250,,)
ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE118I 0 UNKNOWN FILE SIZE - FILSZ=EN MAY IMPROVE RESOURCE USAGE AND PERFORMAN
ICE751I 0 C5-K51706 C6-K51706 C7-K51706 C8-K51706 E4-K51706 C9-BASE E5-K51706
ICE193I 0 ICEAM2 ENVIRONMENT IN EFFECT - ICEAM2 INSTALLATION MODULE SELECTED
ICE089I 5 MLS132P .STEP30 .YYYYYYY, INPUT LRECL = 250, TYPE = F
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6199854,6199854)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ER
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT
ICE130I 0 OPTIONS: RESALL=8192,RESINV=32768,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW
.ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW
.ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXIT
.ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAM
.ICE235I 0 OPTIONS: NULLOUT=RC0
.ICE750I 0 DC 0 TC 0 CS DSVVV KSZ 50 VSZ 50
.ICE752I 0 FSZ=0 RE IGN=0 C AVG=256 0 WSP=0 E DYN=0 0
.ICE751I 1 BA-K22788 BB-K44382 D3-K24705 E1-K24705 D6-K24705 D3-K24705 D7-K24705
.ICE091I 0 OUTPUT LRECL = 250, TYPE = F
.ICE055I 0 INSERT 19926818, DELETE 19926818
.ICE054I 0 RECORDS - IN: 0, OUT: 0
.ICE134I 0 NUMBER OF BYTES SORTED: 4981704500
.ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 200970 , TRACKS USED: 189240
.ICE199I 0 MEMORY OBJECT STORAGE USED = 16M BYTES
.ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES
.ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES
.ICE052I 0 END OF DFSORT
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
You need to read what Kolusu wrote.
You need to read Appendix A, Using Work Space, and Chapter 6, Invoking DFSORT from a Program, of the DFSORT Application Programming Guide.
You need to look at the Cobol manuals for your version, paying attention to "special registers" which start with the word SORT, the SORT and MERGE verbs, and the FASTSRT compiler option.
Don't arrange to change any of those defaults you showed unless you fully understand their impacts.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
There are so many problems with your job.
1. As enrico pointed out, your shop space manager is restricting the allocation of your sortworks from 500 to 211 of the primary and your secondary is not even considered.
2.
Code:
ICE118I 0 UNKNOWN FILE SIZE - FILSZ=EN MAY IMPROVE RESOURCE USAGE AND PERFORMAN
As suspected you are not passing filesize and your shop restricts the sort works, how do you expect the job to complete? DFSORT cannot dynamically allocate the sortworks as it does NOT know what the file size is. And your JCL sort works aren't enough.
3. Your successful run shows that you have about 20 million records with a size of 4.6 gigs of data to be sorted. You would need about 7623 cylinders to complete the sort. Given how your shop restricts the primary allocation I suggest you code 8 work datasets each with 900 cylinders as primary
4. Alternatively you can use pass the estimated filesize like 24 million records considering a 20% increase of your current filesize and Dynalloc of 16 and pass it via DFSPARM like shown below
Thankyou very Much to all for your kind suggessions and advice. This is really useful information.
I have some clarifications.
1. I could see in the Foot print with following error message.
Code:
SORT SORT-WORK-FILE ASCENDING KEY SORT-KEY
5409 IGYPG3133-I THE "USING" PHRASE WAS NOT SPECIFIED FOR THE "SORT" STATEMENT. THE "INPUT PROCEDURE" WAS INELIGIB "FASTSRT" COMPILER OPTION.
5409 IGYPG3132-I THE "GIVING" PHRASE WAS NOT SPECIFIED FOR THE "SORT" STATEMENT. THE "OUTPUT PROCEDURE" WAS INELIG "FASTSRT" COMPILER OPTION.
So I belive, It is not using Fastsrt compiler option, And this procedure is bit complex to covert it to fastsrt.
My understanding is still, I can use Dynalloc.. Please advice.
2. enrico has mentioned shop space manager is restricting the allocation of your sortworks,
what should i do to prevent that error.
Also he has mentioned Default is under estimated IMO, what should be the correct value.
Code:
DYNALOC (SYSDA,4) (SYSDA,4) (SYSDA,4)
3.
Instead of this sort work space i feel Dynamic allocation is better.
May I request system programmer to change DYNAUTO=IGNWKDD in the installation, If at all i ask do that, what is the impact analysis i should do ?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Yes, you can still use dynamic workspace allocation without FASTSRT.
Talk to your site support people for how to restrict any "space management".
Put the suggestion to your boss. If you get assigned the task, I'd be surprised, as it comes down to "Production JCL" which you're probably not responsible for. See my comment in my previous post as well.
Sorry that my communication looks ignoring your point. I am currently using the same code as advised by you.I was actually testing your solution in test environment, Since there were number of input files involved, testing takes some time, thought of updating you after the test result.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Outdated softwate happens when an norganization decides to Not keep their software current.
As time passes the software will become outdated.
Having current software needs to be a planned activity. This is not usually done by developers but rather the system support people. The developers Do need to test the upgrade before it is made generally available to "everyone".