I need to search for HIGH VALUES in my input file, location of the HIGH VALUES is in the first 50 bytes. How can I do this work a Sort card ?
I am currently using the following :
SORT FIELDS=COPY
INCLUDE COND=(1,50,CH,EQ,50X'FF')
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Code:
INCLUDE COND=(1,50,CH,EQ,50X'FF')
50X'FF' is NOT valid syntax in the INCLUDE statement. If you want to check for 50 X'FF' bytes, you need to use the correct syntax as follows. Substitute b for each leading blank. The * must be in column 72.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Oh, So i need to put in 'FF' x 50 times in my sort card ? I mean, isn't there a shorter easier way ?
Gee, editors are pretty good at duplicating things. It took me about 2 minutes to set up those control statements.
However, if that's too much for you, another way (though less efficient) would be to use 50X'FF' to create a temporary constant at the end of each record and compare to that. For the example below, I'm assuming your input file has RECFM=FB and LRECL=80.
this will search the entire 50 locations for high values...
No, it won't! Hex constants are padded on the right with binary zeros (X'00') to the length of the field. Your X'FF' constant will actually be handled as a X'FF00...00' constant, not a X'FFFF...FF' constant.
Please don't post "guesses" or untested "solutions" in this Forum. We have two DFSORT developers (Kolusu and myself) answering questions in this Forum, so we don't really need anyone else's "help".