|
|
| Author |
Message |
debajeet.chanda
New User
Joined: 13 Dec 2006 Posts: 2 Location: India
|
|
|
|
I have a situation here:
I have to extract records from a file using DFSORT. The extraction criteria requires me to compare two fields on a record and then extract that record if the the extraction criteria is met.
For example, lets say my extrcation criteria states that if A < B then extract this record.
The format of these fields A and B are PIC 9(10)V99.
How can this be achieved using DFSORT? |
|
| Back to top |
|
 |
References
|
Posted: Fri May 16, 2008 9:42 pm Post subject: Re: Comparing fields within the same record in DFSORT |
 |
|
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 964 Location: Virginia, USA
|
|
|
|
| What is the format of the input file (fixed or variable) and the record size? What are the locations of A & B, are they zoned decimal or packed decimal? |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4190 Location: San Jose, CA
|
|
|
|
PIC 9(10)V99 is a 12-byte ZD field. Let's assume that field A starts in position 11 and field B starts in position 31. Then the DFSORT control statements would be:
| Code: |
OPTION COPY
INCLUDE COND=(11,12,ZD,LT,31,12,ZD)
|
Adjust the positions as needed.
In the future, please post DFSORT questions in the DFSORT Forum. |
|
| Back to top |
|
 |
Moved: Fri May 16, 2008 10:20 pm by Frank Yaeger From JCL to DFSORT/ICETOOL |
|
|