Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DFSORT/ICETOOL :: RE: How to change 'K' or 'M' use Sort

$
0
0
Author: Arun Raj
Posted: Thu May 18, 2017 7:39 pm (GMT 5.5)

Quote:
doing it with sort could be pretty boring ...
I thought of taking up some of that, before I get to my much boring work icon_smile.gif. There could be better ways, but here is one of them that I can think of now.
Code:
//SYSIN     DD *                                       
  OPTION COPY                                           
  OUTREC IFTHEN=(WHEN=INIT,                             
        OVERLAY=(1:1,80,SQZ=(SHIFT=LEFT))),             
         IFTHEN=(WHEN=INIT,                             
        FINDREP=(INOUT=(C'K',C',1024,',                 
                        C'M',C',1048576,',             
                        C'G',C',1073741824,'))),       
         IFTHEN=(WHEN=INIT,                             
          PARSE=(%1=(ENDBEFR=C',',FIXLEN=10,REPEAT=6)),
        OVERLAY=(%1,UFF,MUL,%2,UFF,M10,LENGTH=16,     
                 01:01,16,JFY=(SHIFT=LEFT),             
                 %3,UFF,MUL,%4,UFF,M10,LENGTH=16,     
                 17:17,16,JFY=(SHIFT=LEFT),             
                 %5,UFF,MUL,%6,UFF,M10,LENGTH=16,     
                 33:33,16,JFY=(SHIFT=LEFT)))           

For the OP's input data provided in SORTIN, SORTOUT had
Code:
1048576         1048576         131072
152043520       152043520       0     
1073741824      1073741824      0     
0               0               0     
0               0               0     
262144          262144          65536
262144          262144          65536
1048576         1048576         65536
524288          524288          65536
23068672        23068672        131072
62914560        62914560        262144
1048576         1048576         131072
1048576         1048576         131072
207618048       207618048       0     
1073741824      1073741824      0     
0               0               0     
0               0               0     
262144          262144          65536
262144          262144          65536
1048576         1048576         65536
262144          262144          65536

_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard


Viewing all articles
Browse latest Browse all 8500

Trending Articles