Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is addition of two or more numbers possible in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Is addition of two or more numbers possible in JCL
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: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Wed Feb 17, 2010 8:08 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Feb 17, 2010 8:27 pm    Post subject: Re: Is addition of two or more numbers possible in JCL
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Is addition of two or more numbers possible in JCL
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

Senior Member


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

PostPosted: Fri Feb 19, 2010 7:35 pm    Post subject:
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    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 Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm
No new posts comparing comp-3 and unpacked numbers juares castro COBOL Programming 3 Mon May 30, 2016 6:46 pm
No new posts Performing addition using JCL sort card Shaheen Shaik DFSORT/ICETOOL 14 Fri May 06, 2016 12:25 pm
No new posts Sort Trick for numbers pshongal DFSORT/ICETOOL 4 Tue Mar 22, 2016 1:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us