Page 1 of 1

Compare a field

PostPosted: Tue Aug 04, 2009 1:38 pm
by tonu1986
I have an input PS in the following format:

CREDIT CARD NUMBER - COLUMN 1 TO 16
CARD HOLDER NAME - COLUMN 17 TO 28
CREDIT LIMIT - COLUMN 30 TO 38 -- IN RUPEES
CARD TYPE - COLUMN 40 TO 50

Sample record in the above file:
1457682567098765 ANDREW 42000.00 MASTER CARD

I want to get the records which have CREDIT LIMIT MORE THAN RS 42000.00. Please help me out which sort statement should i use here.

Re: Compare a field

PostPosted: Tue Aug 04, 2009 2:24 pm
by expat
INCLUDE COND=(start,length,CH,GT,C'your value')

Re: Compare a field

PostPosted: Tue Aug 04, 2009 8:56 pm
by Frank Yaeger
tonu1986,

Here's a DFSORT job that will do what you asked for:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(30,9,UFF,GT,4200000)
/*

Re: Compare a field

PostPosted: Fri Aug 07, 2009 12:38 pm
by tonu1986
It worked. Thanks!!