a working snippet to show some division and rounding
Code: Select all
****** ***************************** Top of Data ******************************
000001 //ENRICO1 JOB NOTIFY=&SYSUID,
000002 // MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
000003 //*
000004 //S1 EXEC PGM=SORT
000005 //SYSPRINT DD SYSOUT=*
000006 //SYSOUT DD SYSOUT=*
000007 //TOOLMSG DD SYSOUT=*
000008 //DFSMSG DD SYSOUT=*
000009 //SORTIN DD *
000010 5.12 2.34
000011 5 2
000012 102 2
000013 7 2
000014 6 3
000015 //SORTOUT DD SYSOUT=*
000016 //SYSIN DD *
000017 OPTION COPY
000018 INREC IFTHEN=(WHEN=NONE,
000019 OVERLAY=(22:02,09,UFF,M11,LENGTH=07,C'00',
000020 32:12,09,UFF,M11,LENGTH=09,
000021 42:(22,09,ZD,DIV,32,09,ZD),ZD,LENGTH=09,
000022 52:(42,09,ZD,ADD,+50),ZD,LENGTH=09,
000023 62:(52,07,ZD),ZD,LENGTH=09))
****** **************************** Bottom of Data ****************************
the result
Code: Select all
********************************* TOP OF DATA **********************************
5.12 2.34 000051200 000000234 000000218 000000268 000000002
5 2 000000500 000000002 000000250 000000300 000000003
102 2 000010200 000000002 000005100 000005150 000000051
7 2 000000700 000000002 000000350 000000400 000000004
6 3 000000600 000000003 000000200 000000250 000000002
******************************** BOTTOM OF DATA ********************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort