Page 1 of 1

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

PostPosted: Mon Aug 03, 2009 7:34 pm
by kumar6677
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.

Re: jcl code

PostPosted: Mon Aug 03, 2009 7:40 pm
by expat
/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 ?

Re: jcl code

PostPosted: Mon Aug 03, 2009 8:37 pm
by Frank Yaeger
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.

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

PostPosted: Sun Aug 23, 2009 5:07 pm
by Anuj Dhawan
I smell it as a DB2 problem... hopefully my nose is not flu infected... :D