View previous topic :: View next topic
|
Author |
Message |
rohinitotey
New User
Joined: 02 May 2006 Posts: 7
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
rohinitotey
New User
Joined: 02 May 2006 Posts: 7
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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
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 |
|
|
|