I know I should really crack the manual, but I was doing an OCCUR on a dataset with 3,617,381 records that condensed into 35,502 ON values and I kept getting a B37, even if I allocated the output dataset with 4,000,000 records.
Is there a limit to the no of ON values that OCCUR can handle? and if so, how come it doesn't give me RC=12 or RC=16?
In the end I used a SORT and it worked ok, so nothing wrong with the ip dataset.
Your B37 is not internal COBOL limits, it is DASD allocation. You might have specified 4,000,000 records, but is there enough contiguous space in the DASD pool to accommodate it according to the allocation rules?
I always get caught out when I'm trying to be too smart. Look at that TEMP file: I've got into a bad habit of only using DISP and DSN when allocating those (because I can never remember how the DCB parms go). The problem was that there's a limit to how big a file you can crate without giving it DCB info.
Check out the output:
IGD101I SMS ALLOCATED TO DDNAME (TEMP1 )
STORCLAS (STANDARD) MGMTCLAS ( ) DATACLAS (DCNULLS)
VOL SER NOS=,VIO,
IEF237I JDEV ALLOCATED TO TOOLIN
IEF237I JDEV ALLOCATED TO CTL1CNTL
IEC030I B37-04,IFG0554A,XXXXXXXX,JS0030,TEMP1,VIO , ,SYS07225.T170202.RA000
WER999A XXXXXXXX,JS0030 , - UNSUCCESSFUL SORT B37 S REASON=00000004
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=B37 REASON CODE=00000004