Hello All,
I have a file with RECFM=VB and LRECL=604. In position 173, length 6, format PD, I have a 10-digit number. I would like to select all observations for which the first 7 digits of that number are, say, 1234567. I want to keep all the original variables in the newly created file (i.e. have the same file, but only with observations that correspond to the condition I specify).
I know there is a substring comparison option in SyncSort, but I believe this only works if you want to compare characters.
Possible solutions that come to mind would be:
1) Create a length-10 character string at the end of each record, with the PD variable reformatted as character. Then use the substring comparison tool
2) Create a length-10 numeric string at the end of each record, with the PD variable reformatted as numeric. Then take the integer of that number divided by 1000, which would give me the first 7 digits
However, I am unsuccessful at either. My attempt at the first solution was to use an INREC statement such as:
INREC FIELDS=(1:173,6,PD,CH)
and then use an INCLUDE COND= statement, but I get a "WER268A INREC STATEMENT : SYNTAX ERROR" on the INREC statement.
Please note that I am using SYNCSORT FOR Z/OS, 1.3.0.0R.
Thank you in advance for your help,
Daniel