No, the issue is still not fixed. By correction I meant I have posted the question in the ICETOOLS topic and added the CODE utility.
The issue still persists
You need to find out:
1) what are the DCB attributes of your input dataset? (RECFM, LRECL, BLKSIZE)
2) what are the actual physical records in you test input dataset? (you can use the straightforward output from SORT utility, without any selection or conversion)
3) depending on the results of 1-2, you need to find the way to resolve your issue.
With not enough information, no-one would be able to help you...
Record format . . . : VB Used blocks . . . . : 3
Record length . . . : 4304 Used extents . . . : 1
With RECFM=VB the character positions are calculated by SORT utility including 4-byte RDW prefix. So, the visually first character will have position 5 within the record.
LRECL=4304 defined the maximum allowed record length within this dataset. Real records may have any length, from 5 to 4304 bytes physically, or from 1 to 4300 bytes logically.
You can verify the length of your records in your SORT statements, by using ...,BUILD=(1,2,BI,...) to print out the record length as decimal number. This may help you to detect the short records.
For your initial example, you can use INCLUDE COND=(1,2,BI,LT,+19) to select short records, and to make the decision: how to deal with them?
Quote:
Here, there are many records like this and we need to only include the ones which look like 2022-05-26 BHB.
Further, I looked up the IBM docs(https://www.ibm.com/docs/en/zos/2.3.0?topic=messages-ice218a) for this error and it says that in case of INCLUDE I should use VLSHRT so I modified my SORT card to look like
Code:
//SYSIN DD *
OPTION COPY,VLSHRT
INCLUDE COND=(1,291,SS,EQ,C'.COM')
INREC IFTHEN=(WHEN=(1,2,BI,LT,291),OVERLAY=(291:X))
/*
I first ran the job without the VLSHRT, still same error.
It is then I went through the IBM docs to see what I am missing.
Code:
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,291,SS,EQ,C'.COM')
INREC IFTHEN=(WHEN=(1,2,BI,LT,291),OVERLAY=(291:X))
/*
Error:
Code:
ICE906I 1 ST=BELOW,SR=110142,RC=0
ICE907I 1 ST=BELOW,SA=56872,NF=1,LF=56872,SF=56872
ICE218A 6 100 BYTE VARIABLE RECORD IS SHORTER THAN 291 BYTE MINIMUM FOR
ICE751I 1 EF-BASE F0-BASE E8-I49502
ICE052I 0 END OF DFSORT
I first ran the job without the VLSHRT, still same error.
It is then I went through the IBM docs to see what I am missing.
Code:
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,291,SS,EQ,C'.COM')
INREC IFTHEN=(WHEN=(1,2,BI,LT,291),OVERLAY=(291:X))
/*
Error:
Code:
ICE906I 1 ST=BELOW,SR=110142,RC=0
ICE907I 1 ST=BELOW,SA=56872,NF=1,LF=56872,SF=56872
ICE218A 6 100 BYTE VARIABLE RECORD IS SHORTER THAN 291 BYTE MINIMUM FOR
ICE751I 1 EF-BASE F0-BASE E8-I49502
ICE052I 0 END OF DFSORT
Please, read the previous responses more carefully.
More than one people have provided you with good hints, but you continue ignoring any answer.