How to write the jcl code to get the "total salary



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to write the jcl code to get the "total salary

Postby kumar6677 » Mon Aug 03, 2009 7:34 pm

hi everyone, i need jcl code for adding the values of a particular field in a file.

for example, if a file has a record with a field named "salary",can you tell me how to write the jcl code to get the "total salary" for all the records in a file.
the output has to be written in one output file.
kumar6677
 
Posts: 1
Joined: Mon Aug 03, 2009 7:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to write the jcl code to get the "total salary

 

Re: jcl code

Postby expat » Mon Aug 03, 2009 7:40 pm

/RANT ON
Once more let us clarify exactly what JCL is.

it is Job Control Language.

By itself it does nothing. It is used to invoke the chosen program and to define which datasets are to be used by the DD names associated with the chosen program.

JCL does not have magical powers that solve all problems, JCL is merely the vehicule for telling the processor which program you want it to execute.
/RANT OFF

So which program shall we use to do this ?
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: jcl code

Postby Frank Yaeger » Mon Aug 03, 2009 8:37 pm

kumar6677,

Show an example of the records in the input file (relevant fields only) and what you want for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of the relevant fields.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: How to write the jcl code to get the "total salary

Postby Anuj Dhawan » Sun Aug 23, 2009 5:07 pm

I smell it as a DB2 problem... hopefully my nose is not flu infected... :D
Anuj
Anuj Dhawan
 
Posts: 274
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post