Can someone tell me if it is possible to include a compare for fields in the change command of Outrec part of a sort card?
Say, if the value in position 120 to 125, OR the value from 140 to 145, in the input file, which are both packed decimal values, are greater than 0, then move 'A' to position 300 of the output file, else move 'B' to position 300 of the output file.
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
Hi Harish,
1. Yes, this can be used in both INREC and OUTREC.
2. I guess, this is not an alternative to CHANGE command. This is because with the help of change command you can change or replace a string, but you cannot compare the value of a field.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Harish wrote
Quote:
Also, is this an alternative to the CHANGE command?
IFTHEN clauses can do everything the CHANGE function can do, and more.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: