Page 1 of 2

Not able to use INCLUDE on a VB file !!!

PostPosted: Wed Oct 01, 2008 3:23 pm
by ranga_subham
Hi,

I ran a SPUFI and it gave me a dataset with attributes: LRECL=4000, BLKSIZE=4004. I am using this dataset as input to a simple SORT as given below:

//STEP01 EXEC PGM=SORT                             
//SORTIN   DD DSN=PIKAS.MACHAS.TEST08.OUT1,DISP=SHR
//SORTOUT  DD DSN=PIKAS.MACHAS.TEST08.OUTO,DISP=SHR
//SYSIN    DD  *                                   
 SORT FIELDS=COPY                                 
 INCLUDE COND=(370,7,CH,EQ,C'1032903')                   
/*                                                 
//SYSPRINT DD SYSOUT=*                             
//SYSOUT   DD SYSOUT=*                             


Input:
----7----+----8-
----------------
----------------
1032903         
----------------
----------------
----------------
----------------
----------------
1032903         
1032903         
1032903         
----------------
1032903         


This job is failing with the below information in SYSOUT:

SYSIN :                                                           
 SORT FIELDS=COPY                                                 
 INCLUDE COND=(370,7,CH,EQ,C'1032903')                           
WER276B  SYSDIAG= 22404, 917422, 917422, 1248421                 
WER164B  6,904K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B     0 BYTES RESERVE REQUESTED, 1,035,872 BYTES USED       
WER146B  12K BYTES OF EMERGENCY SPACE ALLOCATED                   
WER108I  SORTIN   : RECFM=VB   ; LRECL=  4000; BLKSIZE=  4004     
WER110I  SORTOUT  : RECFM=VB   ; LRECL=  4000; BLKSIZE=  4004     
WER055I  INSERT          0, DELETE          1                     
WER250A  INCLUDE/OMIT FIELD BEYOND RECORD                         
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                     


Would you please tell me why the job has to abend with "INCLUDE/OMIT FIELD BEYOND RECORD"? Though the field starts at 366th column in put file, I am using 370 as starting position because the input is VB file.

Please help.

Thanks.

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Wed Oct 01, 2008 7:57 pm
by Alissa Margulies
You are receiving the WER250A message because you apparently have a short record - a record with an LRECL shorter than your INCLUDE comparison (370,7). You can either run HISTOGRM to identify the short record(s), or take a look at option VLTESTI. You can pass the VLTESTI=1 or VLTESTI=2 as a runtime parameter to get around the problem.

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Wed Oct 01, 2008 8:34 pm
by ranga_subham
Alissa, thanks for the quick reply. :D

Would you please tell me how to use HISTOGRM option to get out of this problem?

Thank you very much once again........ :D

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Wed Oct 01, 2008 8:41 pm
by Alissa Margulies
HISTOGRM is not an option. It is a utility program that you can use to gain information about variable-length files. It is fully documented in Chapter 13 of the SyncSort for z/OS 1.3 Programmer's Guide (or Chapter 14 in release 1.2).

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Wed Oct 01, 2008 10:19 pm
by ranga_subham
I tried the HISTOGRM and it showed me all the details of the VB file....... really helpful.............Thanks. :D

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Thu Oct 02, 2008 7:58 pm
by ranga_subham
Alissa,

I was going through the Syncsort programming guide and found another solution to my problem. I need not to use the PARM='VLTESTI=1' with this method. :o

//SYSIN    DD  *                                             
 SORT FIELDS=COPY                                             
 OUTFIL FILES=1,INCLUDE=(370,7,CH,EQ,C'1032903'),STARTREC=274,
                ENDREC=556                                   
/*                                                           


Just thought to share it here........... :D

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Thu Oct 02, 2008 8:28 pm
by Alissa Margulies
Were these record numbers from the HISTOGRM report ?? If not, how did you come up with the STARTREC and ENDREC values?

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Thu Oct 02, 2008 9:54 pm
by ranga_subham
There was a little manual effort involved in it though.........

Since the input file is an output from SPUFI, I looked where exactly the column names were started and considered that as my STARTREC and went to bottom to find which was the last record displayed and considred that as ENDREC. :roll:

Thanks.

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Thu Oct 02, 2008 9:58 pm
by Alissa Margulies
Hey, as long as it works for you, I'm happy.

Re: Not able to use INCLUDE on a VB file !!!

PostPosted: Fri Oct 03, 2008 3:52 pm
by ranga_subham
Another interesting thing is I've executed this using File-Aid batch job and it does not bother whether an input file is VB with short records or long records. It simply ended with return code 0 as soon as I submitted the job and gave my results as expected........... :D

Just to share this here in this forum........

//SYSIN    DD  *                 
$$DD01 COPY IF=(370,EQ,C'1032903')
/*                               


Thanks.