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

Is addition of two or more numbers possible in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
The Dark Knight

New User


Joined: 16 Feb 2010
Posts: 3
Location: India

PostPosted: Wed Feb 17, 2010 7:54 pm
Reply with quote

Is it possible to add two / more numbers via JCL itself...... Sply via Syncsort ?

Please throw light on this..


Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 17, 2010 8:08 pm
Reply with quote

Quote:
Is it possible to add two / more numbers via JCL itself
No. JCL does nothing but run programs. These programs can be utilities such as Syncsort, IDCAMS, IEBGENER, or application programs but JCL will not do anything by itself.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Feb 17, 2010 8:27 pm
Reply with quote

The Dark Knight wrote:
Is it possible to add two / more numbers via JCL itself......
Yes, probably (assuming 'JCL' refers to a utility rather than a programming language)..... icon_rolleyes.gif
Quote:
Sply via Syncsort ?
"Sply"?

What Robert Sample said, check your Syncsort manual......
Back to top
View user's profile Send private message
viveksurya

New User


Joined: 08 Jun 2009
Posts: 36
Location: Bangalore

PostPosted: Wed Feb 17, 2010 9:13 pm
Reply with quote

Please check the manual.
SYNCSORT - "SUM FIELDS" can be used to add value at particular coulmns.
DFSORT - "SUM FIElDS", TOT function can be used for the same.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Feb 17, 2010 9:37 pm
Reply with quote

Quote:
Is it possible to add two / more numbers via JCL itself...... Sply via Syncsort ?


Please be specific.

Do you want to add two\more numbers present in same record?
or do u want to add numbers present at specific position in the file based on some key in the record?

It would be nice if you could show us sample records and required output for it. (Use code tag)

People here then will be able to give more accurate answers
Back to top
View user's profile Send private message
The Dark Knight

New User


Joined: 16 Feb 2010
Posts: 3
Location: India

PostPosted: Fri Feb 19, 2010 6:36 pm
Reply with quote

Thanks all for your replies.

My query was,

Adding two numbers in the position 1 to 3 & 5 to 7 and writing the output in same or random pos.

Code:
1234567
987 677
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Feb 19, 2010 7:35 pm
Reply with quote

Experiment with the below sort-card:
Code:
//SYSIN DD *                               
  OPTION COPY                               
  OUTREC FIELDS=(1,3,ZD,ADD,5,3,ZD,LENGTH=4)
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Feild level validation to test first ... JCL & VSAM 10
No new posts Line numbers contains last 6 digits o... TSO/ISPF 4
No new posts Random Numbers distributed evenly wit... COBOL Programming 6
Search our Forums:

Back to Top