IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Addition Using sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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: 496
Location: USA

PostPosted: Fri Jun 27, 2008 9:11 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top