View previous topic :: View next topic
|
Author |
Message |
nivasaya
New User
Joined: 03 May 2007 Posts: 27 Location: India
|
|
|
|
Dear team,
The INPUT file is Sequential file with RECORD FORMAT as VB
I want to select the records with the below condition to a output file of same characteristic of a input file
1) FILE-CODE --> START -11 END - 12 PIC X(02) Select Condition =’AD’
2) FIELD-CODE --> START - 65 END - 66 PIC S9(04) Select Condition = 0
3) ORG -->START - 13 END - 15 PIC 9(03) Sort by Ascending order AND
4) ACT --> START - 16 END - 34 PIC X(19) Sort by Ascending order
Sort file from FIELD CODE = zero and FILE CODE = ‘AD’ and SORT with ORG and ACC in Ascending order.
I have tried this, but not working
Code: |
SORT FIELDS=(13,22,CH,A)
INCLUDE COND=((11,2,CH,EQ,C’AD’),AND,
(65,2,BI,EQ,0))
|
I have tried this, but not working
Code: |
SORT FIELDS=(13,22,CH,A)
INCLUDE COND=((11,2,CH,EQ,C’AD’),AND,
(65,2,CH,EQ,C’0’))
|
Please help me in resolving this issue.
Thanks & Regards,
Nivisaya |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Nivasaya,
Quote: |
The INPUT file is Sequential file with RECORD FORMAT as VB
|
As your Input file is VB the data always starts from position 5 leaving 4 bytes for RDW. |
|
Back to top |
|
|
nivasaya
New User
Joined: 03 May 2007 Posts: 27 Location: India
|
|
|
|
Thanks Aaru Vedam and Team,
Yes it worked adding 4 bytes for VB
Code: |
SORT FIELDS=(17,22,CH,A)
INCLUDE COND=((15,2,CH,EQ,C’AD’),AND,
(69,2,BI,EQ,0))
|
Thanks & Regards,
Nivasaya |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
You are welcome ! |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
FYI, the INCLUDE statement can be simplified to:
Code: |
INCLUDE COND=(15,2,CH,EQ,C'AD',AND,69,2,BI,EQ,0)
|
|
|
Back to top |
|
|
|
|