Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Sri h Kolusu
>> UBFLAG4 and UMFLAG4 are not recognized as valid names. As far as I can tell, 
>> the DCOLLECT record descriptors that I am using are the most recent ones on 
>> the IBM site, even if they are for z/OS 2.1.
Any suggestions?

Jack,

Looks like you have old symbols for DCollect. I will send an offline email with 
the updated symbols.



Thanks,
Kolusu
DFSORT Development
IBM Corporation


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Jack Zukt
Hi Kolusu,

UBFLAG4 and UMFLAG4 are not recognized as valid names. As far as I can
tell, the DCOLLECT record descriptors that I am using are the most recent
ones on the IBM site, even if they are for z/OS 2.1.
Any suggestions?
Best wishes
Jack

On Thu, 7 Sept 2023 at 17:15, Sri h Kolusu  wrote:

> >> DFSORT is a magnificent product but I still am in an very early user
> stage.
>
> Jack,
>
> Thank you very much.
>
> >> You are so right about that. I was waiting for having this right before
> I would attempt that step. I have to do this in small steps.
>
> It is quite simple to add it in the existing job itself.  All you need is
> to change the INREC. Here are the updated control cards.  I added comments
> so that it is easy to see what is changed/added
>
> //SYSINDD *
>   OPTION VLSCMP,DYNALLOC=(,4)
>   INCLUDE COND=(DCURCTYP,EQ,DCUDATAT,OR, * DATA RECORD
> DCURCTYP,EQ,UKTMIGR,OR,  * MIGR RECORD
> DCURCTYP,EQ,UKTBACK) * BACKUP RECORD
>
> ** Parse the datasetname for HLQ and init the space values
>
>   INREC IFTHEN=(WHEN=INIT,
>PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
>  OVERLAY=(FMT-HLQ:%01,
>   TMP-DCDALLSP:8Z,
>   TMP-UMALLSP:8Z,
>   TMP-UBALLSP:8Z)),
>
> ** If allocated space is 31-bit value for type "D" records
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT,AND,
>   DCDFLAG2,EQ,DCDALLFG),
>  OVERLAY=(TMP-DCDALLSP2:DCDALLSP),HIT=NEXT),
>
> ** If allocated space is 64-bit value for type "D" records
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT,AND,
>   DCDFLAG5,EQ,DCDALLFX),
>  OVERLAY=(TMP-DCDALLSP:DCDALLSX)),
>
> ** Assume allocated space is in "KB" for type "M" records
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
>  OVERLAY=(TMP-UMALLSP2:UMALLSP),HIT=NEXT),
>
> ** Check if allocated spaces is in "MB" for type "M" records and
> ** convert it to KB value by multiplying with +1024
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR,AND,
>   UMFLAG4,EQ,UMALLSP_FMB),
>  OVERLAY=(TMP-UMALLSP:UMALLSP,MUL,+1024,BI,LENGTH=8)),
>
> ** Assume allocated space is in "KB" for type "B" records
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,UKTBACK),
> OVERLAY=(TMP-UBALLSP2:UBALLSP),HIT=NEXT),
>
> ** Check if allocated spaces is in "MB" for type "B" records and
> ** convert it to KB value by multiplying with +1024
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,UKTBACK,AND,
>   UBFLAG4,EQ,UBALLSP_FMB),
>  OVERLAY=(TMP-UBALLSP:UBALLSP,MUL,+1024,BI,LENGTH=8))
>
>   SORT FIELDS=(FMT-HLQ,A)   * SORT BY DATASET HLQ
> *
>   SUM FIELDS=(TMP-DCDALLSP, * SUM ALLOC SPACE
>   TMP-UMALLSP,  * SUM MIGRAT SPACE
>   TMP-UBALLSP)  * SUM BACKUP SPACE
> *
>   OUTREC BUILD=(1,4,
> FMT-HLQ,
> X,
> TMP-DCDALLSP,EDIT=(III.III.III.III.IIT),
> C' KB ',
> TMP-UMALLSP,EDIT=(III.III.III.III.IIT),
> C' KB ',
> TMP-UBALLSP,EDIT=(III.III.III.III.IIT),
> C' KB ')
> /*
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Sri h Kolusu
>> DFSORT is a magnificent product but I still am in an very early user stage.

Jack,

Thank you very much.

>> You are so right about that. I was waiting for having this right before I 
>> would attempt that step. I have to do this in small steps.

It is quite simple to add it in the existing job itself.  All you need is to 
change the INREC. Here are the updated control cards.  I added comments so that 
it is easy to see what is changed/added

//SYSINDD *
  OPTION VLSCMP,DYNALLOC=(,4)
  INCLUDE COND=(DCURCTYP,EQ,DCUDATAT,OR, * DATA RECORD
DCURCTYP,EQ,UKTMIGR,OR,  * MIGR RECORD
DCURCTYP,EQ,UKTBACK) * BACKUP RECORD

** Parse the datasetname for HLQ and init the space values

  INREC IFTHEN=(WHEN=INIT,
   PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
 OVERLAY=(FMT-HLQ:%01,
  TMP-DCDALLSP:8Z,
  TMP-UMALLSP:8Z,
  TMP-UBALLSP:8Z)),

** If allocated space is 31-bit value for type "D" records

IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT,AND,
  DCDFLAG2,EQ,DCDALLFG),
 OVERLAY=(TMP-DCDALLSP2:DCDALLSP),HIT=NEXT),

** If allocated space is 64-bit value for type "D" records

IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT,AND,
  DCDFLAG5,EQ,DCDALLFX),
 OVERLAY=(TMP-DCDALLSP:DCDALLSX)),

** Assume allocated space is in "KB" for type "M" records

IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
 OVERLAY=(TMP-UMALLSP2:UMALLSP),HIT=NEXT),

** Check if allocated spaces is in "MB" for type "M" records and
** convert it to KB value by multiplying with +1024

IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR,AND,
  UMFLAG4,EQ,UMALLSP_FMB),
 OVERLAY=(TMP-UMALLSP:UMALLSP,MUL,+1024,BI,LENGTH=8)),

** Assume allocated space is in "KB" for type "B" records

IFTHEN=(WHEN=(DCURCTYP,EQ,UKTBACK),
OVERLAY=(TMP-UBALLSP2:UBALLSP),HIT=NEXT),

** Check if allocated spaces is in "MB" for type "B" records and
** convert it to KB value by multiplying with +1024

IFTHEN=(WHEN=(DCURCTYP,EQ,UKTBACK,AND,
  UBFLAG4,EQ,UBALLSP_FMB),
 OVERLAY=(TMP-UBALLSP:UBALLSP,MUL,+1024,BI,LENGTH=8))

  SORT FIELDS=(FMT-HLQ,A)   * SORT BY DATASET HLQ
*
  SUM FIELDS=(TMP-DCDALLSP, * SUM ALLOC SPACE
  TMP-UMALLSP,  * SUM MIGRAT SPACE
  TMP-UBALLSP)  * SUM BACKUP SPACE
*
  OUTREC BUILD=(1,4,
FMT-HLQ,
X,
TMP-DCDALLSP,EDIT=(III.III.III.III.IIT),
C' KB ',
TMP-UMALLSP,EDIT=(III.III.III.III.IIT),
C' KB ',
TMP-UBALLSP,EDIT=(III.III.III.III.IIT),
C' KB ')
/*

Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Jack Zukt
Kolusu,
You are so right about that. I was waiting for having this right before I
would attempt that step.
DFSORT is a magnificent product but I still am in an very early user stage.
I have to do this in small steps.
Thank you once again for your help
Best wishes
Jack

On Thu, 7 Sept 2023 at 16:33, Sri h Kolusu  wrote:

> >> Of course it was that. That is what happens when you copy something so
> it you will not have to write everything from scratch.
>
> Jack,
>
> Glad to hear that the issue is resolved. I wanted to bring this up
> yesterday itself. you may want to check if the space values you are getting
> are indeed 31-bit values.
>
> For example, the Type "D" records, you need to look at the flags.
>
> DCDALLSP,*,4,FIDATA SET ALLOCATED SPACE IN KBS (1024)
> WHEN DCDALLFG IS ON
>
>  DCDFLAG5,*,1,BIINFORMATION FLAG #5
>DCDALLFX,B'1...'   63BIT ALLOCATED SPACE IN DCDALLSX
>
>
> Similarly you need to check for record types "B" and "M"
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Sri h Kolusu
>> Of course it was that. That is what happens when you copy something so it 
>> you will not have to write everything from scratch.

Jack,

Glad to hear that the issue is resolved. I wanted to bring this up yesterday 
itself. you may want to check if the space values you are getting are indeed 
31-bit values.

For example, the Type "D" records, you need to look at the flags.

DCDALLSP,*,4,FIDATA SET ALLOCATED SPACE IN KBS (1024)
WHEN DCDALLFG IS ON

 DCDFLAG5,*,1,BIINFORMATION FLAG #5
   DCDALLFX,B'1...'   63BIT ALLOCATED SPACE IN DCDALLSX


Similarly you need to check for record types "B" and "M"

Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Jack Zukt
Kolusu,

Of course it was that. That is what happens when you copy something so it
you will not have to write everything from scratch.
I forgot to change that 12 to 8, as I did on the other places.
Thank you so much for your help. That is one of those errors that was
staring me on the face and yet I could not see it.
At least most of the other stuff was as it should have been.
My heartfelt thank you. This has been driving me crazy for the past two
days.
Best wishes.
Jack

On Thu, 7 Sept 2023 at 15:52, Sri h Kolusu  wrote:

> >> After tinkering a little bit more, as I was far form satisfied with the
> last result, I managed to get twenty two output records:
>
>
> Jack,
>
> Looking at the results, something does NOT add up. Your HLQ is 8 bytes,
> however you have defined the symbol for it as FMT-HLQ as 12 Bytes.  May be
> the garbage values are being considered as a break. Can you turn HEX on the
> 3 record output and see if you can see any values after the hlq ASCLI ?
>
> You  can change the symbol
>
> FMT-HLQ,*,12,CH
>
> To
>
> FMT-HLQ,*,08,CH
>
>
> Now re-run the job once again and see if you are getting the right
> results.  If you are still getting incorrect results, then please terse the
> DCOLLECT file and send it as an attachment to my email offline and I will
> see if I can find something.
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Sri h Kolusu
>> After tinkering a little bit more, as I was far form satisfied with the last 
>> result, I managed to get twenty two output records:


Jack,

Looking at the results, something does NOT add up. Your HLQ is 8 bytes, however 
you have defined the symbol for it as FMT-HLQ as 12 Bytes.  May be the garbage 
values are being considered as a break. Can you turn HEX on the 3 record output 
and see if you can see any values after the hlq ASCLI ?

You  can change the symbol

FMT-HLQ,*,12,CH

To

FMT-HLQ,*,08,CH


Now re-run the job once again and see if you are getting the right results.  If 
you are still getting incorrect results, then please terse the DCOLLECT file 
and send it as an attachment to my email offline and I will see if I can find 
something.

Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Jack Zukt
Hello again,
After tinkering a little bit more, as I was far form satisfied with the
last result, I managed to get twenty two output records:

ASCLI830 KB  0 KB  0 KB
ASCLI  8.190 KB  0 KB  0 KB
ASCLI166 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI  3.320 KB  0 KB  0 KB
ASCLI332 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI  0 KB830 KB  0 KB
ASCLI  0 KB  0 KB830 KB
ASCLI  0 KB  0 KB830 KB
ASCLI  0 KB  0 KB332 KB
ASCLI  0 KB  0 KB  3.320 KB
ASCLI  0 KB  0 KB  8.189 KB
ASCLI  0 KB  0 KB166 KB
ASCLI  0 KB  0 KB830 KB
ASCLI  0 KB  0 KB830 KB
ASCLI  0 KB  0 KB830 KB
ASCLI  0 KB  0 KB830 KB
ASCLI  0 KB  0 KB830 KB

So, now I have one output record for each input one, but if I add the SORT
FIELDS=HLQ, I get three, one total for each record type:
ASCLI  0 KB830 KB  0 KB
ASCLI 16.988 KB  0 KB  0 KB
ASCLI  0 KB  0 KB 17.817 KB

And I still cannot understand why.
Best wishes
Jack

On Thu, 7 Sept 2023 at 15:11, Jack Zukt  wrote:

> Hi Kolusu,
>
> Thank you for you help.
> I used one HLQ that has few files, (10 DASD; 1 Migrated; 11 HSM Backup; 22
> DCOLLECT records).
>
> On my first try it gave me three output records:
> ASCLI  0 KB830 KB  0 KB
> ASCLI 16.988 KB  0 KB  0 KB
> ASCLI  0 KB  0 KB 17.817 KB
>
> on the second run, with OUTFIL INCLUDE and without SUM FIELDS, it gave me
> ten records:
> ASCLI830 KB  0 KB  0 KB
> ASCLI  8.190 KB  0 KB  0 KB
> ASCLI166 KB  0 KB  0 KB
> ASCLI830 KB  0 KB  0 KB
> ASCLI830 KB  0 KB  0 KB
> ASCLI830 KB  0 KB  0 KB
> ASCLI  3.320 KB  0 KB  0 KB
> ASCLI332 KB  0 KB  0 KB
> ASCLI830 KB  0 KB  0 KB
> ASCLI830 KB  0 KB  0 KB
>
> It has the info from the ten type "D" records but there is no information
> for the type "B" and type "M" records.
>
> Any ideas?
> Jack
>
>
> On Thu, 7 Sept 2023 at 13:14, Sri h Kolusu  wrote:
>
>> >> Now, I hope that you do not mind if I ask you for one more thing. I
>> wanted to have one line with the high level qualifier and all the three
>> values but instead I am getting three lines for each HLQ.
>>
>> Jack,
>>
>> If you used the updated INREC then you should have gotten a summary
>> record of 1 record per HLQ.  If you are still getting multiple records per
>> hlq, then you still must be getting an overflow. How about we diagnose the
>> issue?
>>
>> Pick a HLQ where you are getting multiple records and use it in the
>> include on OUTFIL without SUM fields
>>
>> //SYSINDD *
>>   OPTION VLSHRT,VLSCMP,DYNALLOC=(,4)
>>   INCLUDE COND=(DCURCTYP,EQ,DCUDATAT,OR, * DATA RECORD
>> DCURCTYP,EQ,UKTMIGR,OR,  * MIGR RECORD
>> DCURCTYP,EQ,UKTBACK) * BACKUP RECORD
>>
>>   INREC IFTHEN=(WHEN=INIT,
>> PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
>> OVERLAY=(FMT-HLQ:%01,
>>  TMP-DCDALLSP:8Z,
>>  TMP-UMALLSP:8Z,
>>  TMP-UBALLSP:8Z)),
>>
>> IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT),
>> OVERLAY=(TMP-DCDALLSP2:DCDALLSP)),  * ALLOC SPACE
>>
>> IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
>> OVERLAY=(TMP-UMALLSP2:UMALLSP)),* MIGRATED SPACE
>>
>> IFTHEN=(WHEN=NONE,
>> OVERLAY=(TMP-UBALLSP2:UBALLSP)) * BACKUP SPACE
>>
>>   SORT FIELDS=(FMT-HLQ,A)   * SORT BY DATASET HLQ
>>
>>   OUTFIL 

Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Jack Zukt
Hi Kolusu,

Thank you for you help.
I used one HLQ that has few files, (10 DASD; 1 Migrated; 11 HSM Backup; 22
DCOLLECT records).

On my first try it gave me three output records:
ASCLI  0 KB830 KB  0 KB
ASCLI 16.988 KB  0 KB  0 KB
ASCLI  0 KB  0 KB 17.817 KB

on the second run, with OUTFIL INCLUDE and without SUM FIELDS, it gave me
ten records:
ASCLI830 KB  0 KB  0 KB
ASCLI  8.190 KB  0 KB  0 KB
ASCLI166 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI  3.320 KB  0 KB  0 KB
ASCLI332 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB
ASCLI830 KB  0 KB  0 KB

It has the info from the ten type "D" records but there is no information
for the type "B" and type "M" records.

Any ideas?
Jack


On Thu, 7 Sept 2023 at 13:14, Sri h Kolusu  wrote:

> >> Now, I hope that you do not mind if I ask you for one more thing. I
> wanted to have one line with the high level qualifier and all the three
> values but instead I am getting three lines for each HLQ.
>
> Jack,
>
> If you used the updated INREC then you should have gotten a summary record
> of 1 record per HLQ.  If you are still getting multiple records per hlq,
> then you still must be getting an overflow. How about we diagnose the issue?
>
> Pick a HLQ where you are getting multiple records and use it in the
> include on OUTFIL without SUM fields
>
> //SYSINDD *
>   OPTION VLSHRT,VLSCMP,DYNALLOC=(,4)
>   INCLUDE COND=(DCURCTYP,EQ,DCUDATAT,OR, * DATA RECORD
> DCURCTYP,EQ,UKTMIGR,OR,  * MIGR RECORD
> DCURCTYP,EQ,UKTBACK) * BACKUP RECORD
>
>   INREC IFTHEN=(WHEN=INIT,
> PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
> OVERLAY=(FMT-HLQ:%01,
>  TMP-DCDALLSP:8Z,
>  TMP-UMALLSP:8Z,
>  TMP-UBALLSP:8Z)),
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT),
> OVERLAY=(TMP-DCDALLSP2:DCDALLSP)),  * ALLOC SPACE
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
> OVERLAY=(TMP-UMALLSP2:UMALLSP)),* MIGRATED SPACE
>
> IFTHEN=(WHEN=NONE,
> OVERLAY=(TMP-UBALLSP2:UBALLSP)) * BACKUP SPACE
>
>   SORT FIELDS=(FMT-HLQ,A)   * SORT BY DATASET HLQ
>
>   OUTFIL INCLUDE=(FMT-HLQ,EQ,C'JACKZUKT')
> /*
>
>
> Now check the output for the field values of all the space fields that you
> added.
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Sri h Kolusu
>> Now, I hope that you do not mind if I ask you for one more thing. I wanted 
>> to have one line with the high level qualifier and all the three values but 
>> instead I am getting three lines for each HLQ.

Jack,

If you used the updated INREC then you should have gotten a summary record of 1 
record per HLQ.  If you are still getting multiple records per hlq, then you 
still must be getting an overflow. How about we diagnose the issue?

Pick a HLQ where you are getting multiple records and use it in the include on 
OUTFIL without SUM fields

//SYSINDD *
  OPTION VLSHRT,VLSCMP,DYNALLOC=(,4)
  INCLUDE COND=(DCURCTYP,EQ,DCUDATAT,OR, * DATA RECORD
DCURCTYP,EQ,UKTMIGR,OR,  * MIGR RECORD
DCURCTYP,EQ,UKTBACK) * BACKUP RECORD

  INREC IFTHEN=(WHEN=INIT,
PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(FMT-HLQ:%01,
 TMP-DCDALLSP:8Z,
 TMP-UMALLSP:8Z,
 TMP-UBALLSP:8Z)),

IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT),
OVERLAY=(TMP-DCDALLSP2:DCDALLSP)),  * ALLOC SPACE

IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
OVERLAY=(TMP-UMALLSP2:UMALLSP)),* MIGRATED SPACE

IFTHEN=(WHEN=NONE,
OVERLAY=(TMP-UBALLSP2:UBALLSP)) * BACKUP SPACE

  SORT FIELDS=(FMT-HLQ,A)   * SORT BY DATASET HLQ

  OUTFIL INCLUDE=(FMT-HLQ,EQ,C'JACKZUKT')
/*


Now check the output for the field values of all the space fields that you 
added.

Thanks,
Kolusu
DFSORT Development
IBM Corporation



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-07 Thread Jack Zukt
Hi Kolusu,

I knew it must be something simple,I just could not figure it out.
Thank you so much for your help and for the explanation.
Now, I hope that you do not mind if I ask you for one more thing. I wanted
to have one line with the high level qualifier and all the three values but
instead I am getting three lines for each HLQ.
I was under the impression that by doing the sort by the HLQ than I would
get that result but obviously that is not what is happening. Can you please
shed some light in this?
Thank you
Best wishes
Jack

On Wed, 6 Sept 2023 at 18:52, Sri h Kolusu  wrote:

> Jack,
>
> I just ran your control cards against my dcollect extract and I know the
> reason for overflow.  Your INREC is initializing the space values that you
> are summing with zeros IF that Record( D, B, M) is FOUND.  So, if you don't
> have any one of the record, you will be summing the spaces/garbage and it
> will exceed the 8 byte value.  So, you just need to change the INREC to the
> following.  I just moved the initialization of the space values to
> WHEN=INIT.
>
>   INREC IFTHEN=(WHEN=INIT,
> PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
> OVERLAY=(FMT-HLQ:%01,
>  TMP-DCDALLSP:8Z,
>  TMP-UMALLSP:8Z,
>  TMP-UBALLSP:8Z)),
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT),
> OVERLAY=(TMP-DCDALLSP2:DCDALLSP)),  * ALLOC SPACE
>
> IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
> OVERLAY=(TMP-UMALLSP2:UMALLSP)),* MIGRATED SPACE
>
> IFTHEN=(WHEN=NONE,
> OVERLAY=(TMP-UBALLSP2:UBALLSP)) * BACKUP SPACE
>
>
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Sri h Kolusu
> Sent: Wednesday, September 6, 2023 10:13 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: [EXTERNAL] Re: Help on DFSORT SUM FIELDS
>
> >> I am doing something wrong because I am getting one output record for
> each input record, instead of the few hundreds I was expecting to get.
>
> Jack,
>
> If I had to take an educated guess, you are getting an overflow error.
> Look for ICE152I message in the sysout.  I guess you earlier had a similar
> issue.
>
> https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg124452.html
>
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions, send email
> to lists...@listserv.ua.edu<mailto:lists...@listserv.ua.edu> with the
> message: INFO IBM-MAIN
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-06 Thread Sri h Kolusu
Jack,

I just ran your control cards against my dcollect extract and I know the reason 
for overflow.  Your INREC is initializing the space values that you are summing 
with zeros IF that Record( D, B, M) is FOUND.  So, if you don't have any one of 
the record, you will be summing the spaces/garbage and it will exceed the 8 
byte value.  So, you just need to change the INREC to the following.  I just 
moved the initialization of the space values to WHEN=INIT.

  INREC IFTHEN=(WHEN=INIT,
PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(FMT-HLQ:%01,
 TMP-DCDALLSP:8Z,
 TMP-UMALLSP:8Z,
 TMP-UBALLSP:8Z)),

IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT),
OVERLAY=(TMP-DCDALLSP2:DCDALLSP)),  * ALLOC SPACE

IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
OVERLAY=(TMP-UMALLSP2:UMALLSP)),* MIGRATED SPACE

IFTHEN=(WHEN=NONE,
OVERLAY=(TMP-UBALLSP2:UBALLSP)) * BACKUP SPACE



Thanks,
Kolusu
DFSORT Development
IBM Corporation

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Sri 
h Kolusu
Sent: Wednesday, September 6, 2023 10:13 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: Help on DFSORT SUM FIELDS

>> I am doing something wrong because I am getting one output record for each 
>> input record, instead of the few hundreds I was expecting to get.

Jack,

If I had to take an educated guess, you are getting an overflow error. Look for 
ICE152I message in the sysout.  I guess you earlier had a similar issue.

https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg124452.html


Thanks,
Kolusu
DFSORT Development
IBM Corporation


--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu<mailto:lists...@listserv.ua.edu> with the message: 
INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Help on DFSORT SUM FIELDS

2023-09-06 Thread Sri h Kolusu
>> I am doing something wrong because I am getting one output record for each 
>> input record, instead of the few hundreds I was expecting to get.

Jack,

If I had to take an educated guess, you are getting an overflow error. Look for 
ICE152I message in the sysout.  I guess you earlier had a similar issue.

https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg124452.html


Thanks,
Kolusu
DFSORT Development
IBM Corporation


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Help on DFSORT SUM FIELDS

2023-09-06 Thread Jack Zukt
Hi all,
I am trying to process DCOLLECT type "D"; "B"; "M"; records in order to get
one record by HLQ with the allocated space by active files, migrated files
and backup files, and I am doing something wrong because I am getting one
output record for each input record, instead of the few hundreds I was
expecting to get.
Those are the sort statements I am using:

//STEP0200 EXEC PGM=SORT
//SYMNOUT  DD SYSOUT=*
//SYMNAMES DD  DISP=SHR,DSN=(HEADER)
// DD  DISP=SHR,DSN=(TYPED)
// DD  DISP=SHR,DSN=(TYPEB)
// DD  DISP=SHR,DSN=(TYPEM)
// DD  *
FMT-HLQ,*,12,CH
TMP-DCDALLSP,*,8,BI* ALLOCATED SPACE
TMP-DCDALLSP1,=,4,BI
TMP-DCDALLSP2,*,4,BI
TMP-UBALLSP,*,8,BI * ALLOCATED BACKUP SPACE
TMP-UBALLSP1,=,4,BI
TMP-UBALLSP2,*,4,BI
TMP-UMALLSP,*,8,BI * ALLOCATED MIGRAT SPACE
TMP-UMALLSP1,=,4,BI
TMP-UMALLSP2,*,4,BI
/*
//*
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DISP=SHR,DSN=
//SORTOUT  DD SYSOUT=*
//SYSINDD *
  OPTION VLSHRT,VLSCMP,DYNALLOC=(,4)
  INCLUDE COND=(DCURCTYP,EQ,DCUDATAT,OR, * DATA RECORD
DCURCTYP,EQ,UKTMIGR,OR,  * MIGR RECORD
DCURCTYP,EQ,UKTBACK) * BACKUP RECORD
*
  SORT FIELDS=(FMT-HLQ,A)   * SORT BY DATASET HLQ
*
  SUM FIELDS=(TMP-DCDALLSP, * SUM ALLOC SPACE
  TMP-UMALLSP,  * SUM MIGRAT SPACE
  TMP-UBALLSP)  * SUM BACKUP SPACE
*
  INREC IFTHEN=(WHEN=INIT,
PARSE=(%01=(ABSPOS=29,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(FMT-HLQ:%01)),
IFTHEN=(WHEN=(DCURCTYP,EQ,DCUDATAT),
OVERLAY=(TMP-DCDALLSP:8Z,
 TMP-DCDALLSP2:DCDALLSP)),
IFTHEN=(WHEN=(DCURCTYP,EQ,UKTMIGR),
OVERLAY=(TMP-UMALLSP:8Z,
 TMP-UMALLSP2:UMALLSP)),  * BACKUP SPACE
IFTHEN=(WHEN=NONE,
OVERLAY=(TMP-UBALLSP:8Z,
 TMP-UBALLSP2:UBALLSP))   * BACKUP SPACE
  OUTREC BUILD=(1,4,
FMT-HLQ,
X,
TMP-DCDALLSP,EDIT=(III.III.III.IIT),
C' KB',
TMP-UMALLSP,EDIT=(III.III.III.IIT),
C' KB',
TMP-UBALLSP,EDIT=(III.III.III.IIT),
C' KB')
/*

As usual, your help will be deeply appreciated,
Best wishes
Jack

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN