Compare a field



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Compare a field

Postby tonu1986 » Tue Aug 04, 2009 1:38 pm

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.
tonu1986
 
Posts: 3
Joined: Tue Aug 04, 2009 1:22 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare a field

Postby expat » Tue Aug 04, 2009 2:24 pm

INCLUDE COND=(start,length,CH,GT,C'your value')
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Compare a field

Postby Frank Yaeger » Tue Aug 04, 2009 8:56 pm

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)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Compare a field

Postby tonu1986 » Fri Aug 07, 2009 12:38 pm

It worked. Thanks!!
tonu1986
 
Posts: 3
Joined: Tue Aug 04, 2009 1:22 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post