Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Addition Using sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anu R

New User


Joined: 09 Apr 2008
Posts: 18
Location: India

PostPosted: Fri Jun 27, 2008 4:19 pm    Post subject: Addition Using sort
Reply with quote

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
View user's profile Send private message

karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 27, 2008 4:39 pm    Post subject: Reply to: Addition Using sort
Reply with quote

Hi Anu,

In OUTREC control statement, use the FIELDS subparameter.

Regards
R KARTHIK
Back to top
View user's profile Send private message
Anu R

New User


Joined: 09 Apr 2008
Posts: 18
Location: India

PostPosted: Fri Jun 27, 2008 6:55 pm    Post subject: Reply to: Addition Using sort
Reply with quote

Fields subparameter?Can u tell me how it has to be done?
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Jun 27, 2008 9:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us