Ron Thomas wrote:
>Hi . We have a below file , and here i want to extract all records that have a
>string value "Dropped" , the value is not coming in to any fixed position .
>Could some one let me know how to get the records extracted ?
Easy!
>00000003~94800.00~USD~Process~Submitted~~F00000
>00000004~15640.00~USD~Process~Submitted~~F00000
>00000005~27200.00~USD~Process~Submitted~~PS0323
>00000006~2193.00~USD~Process~Submitted~~USHSR1~
>00178909~750.00~USD~Process~Dropped~Invalid Buyer
A$$uming your records are of fixed length, try this fun JCL:
//SORT EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=<input>
//SORTOUT DD DISP=OLD,DSN=<where to???>
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(COPY)
INCLUDE COND=(1,<last column>,SS,EQ,C'Dropped')
/*
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(50,5))
Groete / Greetings
Elardus Engelbrecht
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN