View previous topic :: View next topic
|
Author |
Message |
Anu R
New User
Joined: 09 Apr 2008 Posts: 18 Location: India
|
|
|
|
Hi,
I have a file which contains emp name,age,DOB etc..I want to add 10 to the age field.Ho can this be done
Eg:
Input
Name Age DOB
AAA 30 13051975
BBB 24 14081983
OUTPUT
Name Age DOB
AAA 40 13051975
BBB 34 14081983 |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi Anu,
In OUTREC control statement, use the FIELDS subparameter.
Regards
R KARTHIK |
|
Back to top |
|
|
Anu R
New User
Joined: 09 Apr 2008 Posts: 18 Location: India
|
|
|
|
Fields subparameter?Can u tell me how it has to be done? |
|
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,4,(5,2,ZD,ADD,+10),LENGTH=3,8,8)
END
/* |
|
|
Back to top |
|
|
|