Page 1 of 1

LISTCAT Command fails with error code IDC3223I

PostPosted: Fri Feb 24, 2012 7:46 pm
by mfrookie
Hi,

I am trying to execute LISTCAT command in batch mode for around 3000 files (sequential files and GDGs bases are supplied as input). The objective is to see what all files have valid entry in catalog, and also to obtain the geenrations of GDGs (if any supplied on input).

But the job abends with message IDC3223I TOO MANY CONSTANTS IN LIST BEGINNING AT ‘xxx’.

I did check the manul for LISTCAT (DFSMS Access Method Services for Catalogs) but did not find any limit as such on the number of entries supplied as input to the LISTCAT command.

The error code description is
IDC3223I TOO MANY CONSTANTS IN LIST BEGINNING AT ‘xxx’
Explanation: Too many constants have been coded in a list.
In the message text:
xxx The constant that begins the list.
System action: Processing skips to the end of the command. The system begins interpretation with the next
command.
Application Programmer Response: Check the parameter definition to see how many constants appear in the list.
Correct the usage. Run the job again.
System programmer response: If the error recurs and the program is not in error, search problem reporting data
bases for a fix for the problem. If no fix exists, contact the IBM Support Center. Provide the SYSOUT output for the
job.
IDC3220I • IDC3223I
Chapter 20. IDC messages 447
Source: DFSMSdfp
Detecting Module: IDCRI01


Can anyone please explain if there is such a limit. If yes, what are the number of entries that we can pass to LISTCAT command. Or is there any alternate way out.

P.S. - When I reduce the limit to say 256, the job goes thru.

Thanks.

Re: LISTCAT Command fails with error code IDC3223I

PostPosted: Fri Feb 24, 2012 8:09 pm
by BillyBoyo
It would seem there is a limit, maybe in the amount of text rather than the number of items.

Why don't you run it is chunks? Either of 256, or find somewhere below where it blows up?

Re: LISTCAT Command fails with error code IDC3223I

PostPosted: Fri Feb 24, 2012 8:24 pm
by mfrookie
Thanks Billy.

The LISTCAT JCL is generated as part of a automation process written using SORT. Now it seems I will have to change that process. Changing it is kind of difficult, as now I will have to add number of OUTFIL statements, with the same HEADERs / TRAILERs and with STARTREC/ENDREC options. And if at all my HEADER and TRAILER changes, I will have to change at it all places. so I was looking for some other option.

Re: LISTCAT Command fails with error code IDC3223I

PostPosted: Fri Feb 24, 2012 8:41 pm
by BillyBoyo
You could use the editor on the output file from the sort to get you going.

Maybe you can look at "break" at a lower level, so you get your existing header/trailer after a set number of records? Which sort do you use? How about asking for that in the appropriate forum here? You'll have to decide on a limit, but to me 256 seems more manageable than a bigger one.

Re: LISTCAT Command fails with error code IDC3223I

PostPosted: Fri Feb 24, 2012 10:56 pm
by expat
Click HERE to use CSI.

It has no restrictions of the number of control statements and may provide the answers that you require without any changes.

Re: LISTCAT Command fails with error code IDC3223I

PostPosted: Mon Feb 27, 2012 7:50 pm
by mfrookie
Thanks a lot Expat.

But I am doubtful that if I will be able to use REXX code in Production. As a shop policy, we generally do not use REXX in Production.

I did manage to work out a solution using the SECTIONS option in SORT as suggested by BillyBoyo. Since I did'n't have a key (as each dataset name was different), I had to do some dirty work in air, but finally got away with it.

Thanks a lot for your help.

Re: LISTCAT Command fails with error code IDC3223I

PostPosted: Mon Feb 27, 2012 9:50 pm
by BillyBoyo
Thanks for letting us know.

If you are able to post your code, it might help someone in the future.

Re: LISTCAT Command fails with error code IDC3223I

PostPosted: Mon Feb 27, 2012 10:56 pm
by mfrookie
This is what I did to get around the problem of not having the key.

Please see that HEADER1, HEADER3, TRAILER3 print out the regular JOB and IDCAMS statements with LISTCAT. The LISTCAT commands starts and ends with DUMMY dataset names (e.g. 'DUMMY.DUMMY.DUMMY'). The OUTREC prints outs the dataset names whcih are already enclosed in quotes.
I am not putting the actual code as I am using lot of SORT symbols and that might confuse others.

INREC IFTHEN=(WHEN=INIT,                                             
* ==> my dataset name
              BUILD=(1,44,                                                   
                     1X,                                             
* ==> added a sequence number, please see that it restartes, rather continues with 1 once it reaches a value of 99.
                     SEQNUM,2,ZD,START=1,INCR=1)),             
      IFTHEN=(WHEN=INIT,                                             
* ==> to obtain a key did some dirty work
         OVERLAY=(81:((66,2,ZD,DIV,+10),ADD,+1),TO=ZD,LENGTH=2))         
* ==> sort on the newly obtained key
SORT FIELDS=(81,2,ZD,A)                                                                 
OUTFIL FNAMES=SEQFLC01,REMOVECC,LINES=160,                                                   
* ==> I am trying to generate JOB with LISTCAT commands
       HEADER1=(C'REGULAR-JOB-STATEMENTS',)                               
* ==> Use the newly generated key as a way for BREAKing the records at a certain limit
       SECTIONS=(81,2,                                                                               
             HEADER3=(C'REGULAR-IDCAMS-JCL-STATEMENTS-GO-HERE'),     
             TRAILER3=(C'REGULAR-IDCAMS-JCL-STATEMENTS-GO-HERE')),     
             OUTREC=(2X,
                            C'ACTUAL-DATASET-NAME-in-quotes',
                            80:1x)



The generated JCL looks list this. Since I might have multiple LSITCAT steps depending on the number of input dataset, I am using MOD on the SYSPRINT dataset as I want to capture all information in a single dataset. The output SYSPRINT dataset is cleaned up as part of HEADER1 processing (which I haven't shown over here).
//G0000001 EXEC PGM=IDCAMS,COND=(4,LT)                                 
//SYSIN    DD   *                                                       
  LISTCAT ENTRIES('DUMMY.DUMMY.DUMMY.DUMMY.DUMMY' -                     
  'DSN-NAME-1' -                                         
  'DSN-NAME-2' -                                         
  'DSN-NAME-3' -
  'DUMMY.DUMMY.DUMMY.DUMMY.DUMMY') ALL                                 
/*                                                                     
//SYSPRINT DD   DSN=SYSPRINT-DATASET-NAME, 
//             DISP=(MOD,CATLG,DELETE),                                 
//             SPACE=(CYL,(10,10),RLSE),
//             RECFM=VBA,                                               
//             LRECL=125,                                               
//             DSORG=PS                                                 
//SYSOUT   DD   SYSOUT=*