If you have FDR Report, this would be easy.  I recon you do not have it, 
otherwise you would not be asking about DFSORT, sorry.

"Confidentially doc, I am the wabbit."

Bugs Bunny

Sent from Proton Mail Android


-------- Original Message --------
On 8/25/25 6:49 PM, Jack Zukt <[email protected]> 
wrote:

>  Hi all,
>  
>  I have a file with information about tape files, that has the dataset name,
>  volser, space used and space used after compression.
>  Using DFSORT, I am trying to produce a file that will have one record by
>  high level qualifier, with the number of files and the total used space
>  without and with compression.
>  My problem is that the sum of used and the sum of compressed space are
>  wrong. Not only they are showing the exact same value (and the input values
>  are very different), as the value for the situations in which there is only
>  one data set for the HLQ is way different from the input file for that
>  dataset.
>  Sample of the input file:
>  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
>   PRODHLA1.FDX967                                VOL335     195035K
>   71303K
>  
>  Sample of the output file for that dataset:
>  PPRDXI             1           1.077.952.576           1.077.952.576 KB
>  
>  So, this are my DFSORT control statements:
>  //SYMNAMES DD  *
>  ASA,1,1,CH
>  DSNAME,*,44,CH
>  SKIP,1
>  VOLSER,*,6,CH
>  SKIP,1
>  FILESZ,*,10,UFF      * USED SPACE
>  SKIP,2
>  CMPRSZ,*,10,UFF      * USED COMPRESSED SPACE
>  SKIP,1
>  *
>  TMP-HLQ,1,08,CH      * HLQ
>  TMP-CNT,*,4,BI       * NUMBER OF FILES BY HLQ
>  TMP-FILESZ,*,08,BI   * TOTAL USED SPACE
>  TMP-FILESZ1,=,04,BI
>  TMP-FILESZ2,*,04,BI
>  TMP-CMPRSZ,*,08,BI   * TOTAL COMPRESSED SPACE
>  TMP-CMPRSZ1,=,04,BI
>  TMP-CMPRSZ2,*,04,BI
>  *
>  //SYSIN    DD *
>    OPTION VLSHRT,VLSCMP,DYNALLOC=(,4)
>    SORT FIELDS=(TMP-HLQ,A)
>    SUM FIELDS=(TMP-FILESZ,TMP-CMPRSZ,TMP-CNT)
>  *
>    INREC PARSE=(%01=(ABSPOS=02,ENDBEFR=C'.',FIXLEN=08))
>            OVERLAY=(TMP-HLQ:%01,
>                     TMP-CNT:+1,BI,LENGTH=4,
>                     TMP-FILESZ:8Z,
>                     TMP-FILESZ2:FILESZ,
>                     TMP-CMPRSZ:8Z,
>                     TMP-CMPRSZ2:CMPRSZ)
>  *
>    OUTFIL FNAMES=OUT01,
>                  BUILD=(TMP-HLQ,
>                  5X,
>                  TMP-CNT,EDIT=(III.IIT),
>                  5X,
>                  TMP-FILESZ,EDIT=(III.III.III.III.III),
>                  5X,
>                  TMP-CMPRSZ,EDIT=(III.III.III.III.III),
>                  C' KB')
>  /*
>  
>  I have been looking at these for so long that I must be looking straight
>  into the error without seeing it.
>  
>  Regards
>  Jack
>  
>  ----------------------------------------------------------------------
>  For IBM-MAIN subscribe / signoff / archive access instructions,
>  send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to