I am sorting a file on the basis of employee id. and i want to perform some arithmatic operation on the salary field. I want to subtract salary from 99999999. I know we can do this by using OUTREC. but i dont know exact syntax of that. Can anybody help me on this.
arexp,edit or (arexp),edit
Specifies that the edited result of an arithmetic expression is to appear in the reformatted OUTFIL output record. An arithmetic expression takes the form:
. term is a field (p,m,f), a parsed field (%nn,f), or a decimal constant (+n or −n). See p,m,f under p,m,f,edit for details on the fields you can use. See deccon under deccon,edit for details on the decimal constants you can use.
. operator is MIN (minimum), MAX (maximum), MUL (multiplication), DIV (division), MOD (modulus), ADD (addition) or SUB (subtraction).
OUTREC=(5:C?% REDUCTION FOR ?,21,8,C? IS ?, ((11,6,ZD,SUB,31,6,ZD),MUL,+1000),DIV,11,6,ZD, EDIT=(SIIT.T),SIGNS=(+,-))
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: