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
 

 

Arithmetic computation in JCL

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

New User


Joined: 02 May 2006
Posts: 7

PostPosted: Tue Dec 23, 2008 1:50 am    Post subject: Arithmetic computation in JCL
Reply with quote

Hi,

I have a 10 large files. Around 30 fields in each of these files need to be multiplied by -1. Can I do this using JCL?

Appreciate any help!

Rohini
Back to top
View user's profile Send private message

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Tue Dec 23, 2008 1:57 am    Post subject:
Reply with quote

If you want to run a batch job, you will do that "using JCL", but you can do that in foreground ( online ) without JCL.

Please please please, in any case you will do that with a program ( utility named or not ).

Now ask for an easytrieve, a dfsort, a syncsort, a Cobol, a RPG, a Assembler, a Edit macro, a REXX, ....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7988
Location: Bellevue, IA

PostPosted: Tue Dec 23, 2008 2:04 am    Post subject:
Reply with quote

Quote:
Can I do this using JCL?
No, JCL does nothing except run programs (IDCAMS, SORT, SAS, COBOL compiles, COBOL programs, PL/I compiles, etc).

What you want can easily be done in a SAS program, COBOL program, PL/I program, and in many other ways -- but all the JCL is going to do is run the program you provide.
Back to top
View user's profile Send private message
rohinitotey

New User


Joined: 02 May 2006
Posts: 7

PostPosted: Tue Dec 23, 2008 2:14 am    Post subject:
Reply with quote

Sorry for not being very specific.

I have 10 large files with fields f1, f2, ...... f100.

What I want to do is :
if f1 = 3 , multiply f30, f31..f90 by -1.

I need to do this processing for all 10 files and the formats and the fields are different for each of them.

If I do this using a cobol program, I will have to spell out each and every field for multiplication. I will need to write a big lengthy program or else multiple programs with same processing.
I wanted to know if I cna do this using a SORT utility or is there any other easier way?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2233
Location: @my desk

PostPosted: Tue Dec 23, 2008 2:30 am    Post subject:
Reply with quote

Quote:
If I do this using a cobol program, I will have to spell out each and every field for multiplication
The above part will be more or less the same for any other methodology as well. In some way or the other you'll have to let the system know which are the fields to be processed.

Quote:
if f1 = 3 , multiply f30, f31..f90 by -1
Do you have around 60 fields or different numeric formats that has to be multiplied by -1?
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Tue Dec 23, 2008 2:31 am    Post subject:
Reply with quote

Sorry, be sure, I don't want to be rude gratis, but is this a real difficulty to achieve what you want?
Have you already tried something?

You joined the forum in 2006. You certainely have learned something during that time?

I suppose you are paid for that now. You are in the business now, you are professional !

I repeat : did you already try something?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Dec 23, 2008 2:38 am    Post subject:
Reply with quote

rohinitotey,

You can use DFSORT's IFTHEN/OVERLAY/MUL functions to do this kind of thing. But if you want more specific help, you need to give the starting position, length and format of the relevant fields (f1, f30, etc).

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 23, 2008 3:05 am    Post subject:
Reply with quote

Hello,

Quote:
I wanted to know if I cna do this using a SORT utility or is there any other easier way?
How might anything handle the logic and the arithmetic if the "code" is not told where the fields are and their format icon_confused.gif

Possibly i misunderstand what you are asking, but it sounds like you want some magic bullet that will be able to do what you want without being provided any detailed information. . .
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 37 Tue Dec 06, 2016 8:04 pm
No new posts Arithmetic operations wit tot= Roland Brosio DFSORT/ICETOOL 4 Wed Jul 31, 2013 6:43 pm
No new posts Bad arithmetic conversion shanudarling CLIST & REXX 11 Mon Jun 11, 2012 8:00 pm
No new posts Can we use linkage section variables ... Chiranjeevi9 COBOL Programming 9 Thu Apr 12, 2012 8:53 pm
No new posts Arithmetic Operation Rohit Umarjikar DFSORT/ICETOOL 21 Wed Apr 11, 2012 7:48 pm


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