View previous topic :: View next topic
|
Author |
Message |
kalyanp_80
New User
Joined: 03 Feb 2006 Posts: 41 Location: Hyderabad
|
|
|
|
Hi,
I have a requirement to use aritematic operations using SORT utility. I am using syncsort.
My file looks something like this:
00014
00015
00016
00017
00018
I need to subtract all these columns with 13.
Please assist.
Thanks
Amith |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Take a look at the OUTFIL FIELDS parameter, It has arithmetic functions....
SyncSort for z/OS 1.3 Programmer’s Guide wrote: |
The arithmetic functions of minimum and maximum (MIN and MAX) are performed before the arithmetic operators (MUL, DIV, MOD, ADD, SUB). Within the arithmetic operators, multiplication (MUL), division (DIV), and modulus (MOD) are performed before addition (ADD) and subtraction (SUB). Operations within the same precedence level are performed from left to right. |
|
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Try this:
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,5,ZD,SUB,+13,M11,LENGTH=5)
END |
|
|
Back to top |
|
|
|