View previous topic :: View next topic
|
Author |
Message |
shanth555
New User
Joined: 17 Aug 2012 Posts: 35 Location: India
|
|
|
|
Code: |
Sec trans
01 10
02 20
03 30
04 40
05 50
|
lets assume the above data in the DSN.i want to calculated the average for Second by using this logic.
Total of trans/ 24*60*60 = Second average.
EX: Here 150/24*60*60 =0.0001
Kindly let me know how to use the above logic in JCL.. Pls help me out. |
|
Back to top |
|
|
shanth555
New User
Joined: 17 Aug 2012 Posts: 35 Location: India
|
|
|
|
Hello enrico-sorichetti,
Pls help me out. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
ennnrriiicoooo where are you?
i can't get my paycheck this week until you have done my work for me. |
|
Back to top |
|
|
shanth555
New User
Joined: 17 Aug 2012 Posts: 35 Location: India
|
|
|
|
.. stop kidding guys... i am helpless. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i was not kidding!
and enrico,
he is sitting there at his desk waiting patiently (maybe not)
for your solution to his problem. |
|
Back to top |
|
|
shanth555
New User
Joined: 17 Aug 2012 Posts: 35 Location: India
|
|
|
|
i think enrico is busy with some other work.
and dbzTHEdinosauer,
Do u have any idea about my logic? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You have to check in you manual/search the forum for things like DIV (divide) and do the calculation on OUTREC/OUTFIL by which time you'll have the SUMmed value, |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
a bit of ingenuity please ...
it should not have been to hard to imagine something along the lines of
Code: |
000005 //ICE EXEC PGM=SORT
000006 //SYSPRINT DD SYSOUT=*
000007 //SYSOUT DD SYSOUT=*
000008 //*4567890123456
000009 //SORTIN DD *
000010 01 1
000011 02 12
000012 03 123
000013 04 1234
000014 05 12345
000015 06 23456
000016 07 34567
000017 08 45678
000018 09 56789
000019 10 67890
000020 //SORTOUT DD SYSOUT=*
000021 //SYSIN DD *
000022 OPTION COPY
000023 INREC OVERLAY=(081:3,8,UFF,MUL,+100000,M11,LENGTH=20,
000024 101:(3,8,UFF,MUL,+100000),DIV,+84600,M11,LENGTH=20)
000025 OUTFIL REMOVECC,NODETAIL,
000026 TRAILER1=('COUNT : ',COUNT=(M11,LENGTH=08),/,
000027 'SUM : ',TOT=(081,20,UFF,EDIT=(TTTTTTTT.TTTTT)),/,
000028 'AVG : ',AVG=(081,20,UFF,EDIT=(TTTTTTTT.TTTTT)),/,
000029 'XSEC : ',TOT=(101,20,UFF,EDIT=(TTTTTTTT.TTTTT))) |
to get
Code: |
COUNT : 00000010
SUM : 00242095.00000
AVG : 00024209.50000
XSEC : 00000002.86160 |
|
|
Back to top |
|
|
|