I have input file of variable record length and i have to extract 2 bytes record from the file.
My sort card looks something like this
The Following error message displayed in the spool.
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
ICE751I 0 C5-K24705 C6-K90007 C7-K90000 C8-K90007 E9-K90007 E7-K24705
The Output should should not contain duplicates.
I tried using the OPTION VLSHRT in the Sort Card but still the message exits.The 2 Byte field starts at the position 148 which is not unique.
The File contains two records types '1' and '2' respectively. The record type '1' is only included.
In order to eliminate duplicates, you must remove the COPY operand and specify a SORT statement with a key or keys on which the records will be matched, and a SUM FIELDS=NONE statement. Remember to add 4 to the starting position for each sort key. For example, if you want to eliminate duplicates on positions 152-153, you could use:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
As written with OR, the INCLUDE statement would include records with '1' in 31 or with nonblank in 152-153. If the OR wants to include records with '1' in 31 and with nonblank in 152-153, then AND would be correct. You may be right that AND is needed, but only the OP knows for sure what he wants.