Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DCOLLECT & DFSORT

97 views
Skip to first unread message

Jack Zukt

unread,
Aug 3, 2021, 8:27:15 AM8/3/21
to
Hello All,
I am trying to build a report of inactive datasets using DCOLLECT for input
and DFSORT to create the files for each last year referenced.
For the output files I only want the dataset name; last used date;
allocated space; used space; storage group name. Now for the tricky part: I
want the date and space fields translated to characters. On the DCOLLECT
input records the date is in the 'yyyydddF' format and the space fields are
4 byte long signed. I am pretty sure that there is a way to tell DFSORT to
make that translation but I am having no luck with the manual.
Any suggestions?
Thank you for any help that you may give me.
Regards
Jack

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

Steve Smith

unread,
Aug 3, 2021, 9:17:25 AM8/3/21
to
I use a format item of E'9999.999' on the field specified as length 4, type
PD... I'm not sure of the syntax on a typical SORT, as I always use symbol
files, and ICETOOL DISPLAY for this sort of thing.

sas

Sri h Kolusu

unread,
Aug 3, 2021, 10:14:28 AM8/3/21
to
On the DCOLLECT
> input records the date is in the 'yyyydddF' format and the space fields
are
> 4 byte long signed. I am pretty sure that there is a way to tell DFSORT
to
> make that translation but I am having no luck with the manual.
> Any suggestions?


Jack,


That is a standard Y4U format date in DFSORT.

So something like this will convert to Gregorian format (CCYY-MM-DD) and if
you want it in Julian date then use TOJUL instead of TOGREG

P,Y4U,TOGREG=Y4T(-),

where P = position of the date field

Here is the link to the description of Y4U

https://www.ibm.com/docs/en/zos/2.3.0?topic=descriptions-dfsort-data-formats

As for allocated space field it is simple Binary field, So depending on the
size you can convert it to readable format

P,M,BI,M10,LENGTH=12

where P = position of the allocated space field and M = length of the field
( 4 or 8) and M10 is an edit mask with leading zeros suppressed and the
output is a readable format field of 12 bytes. You can control the width
of the display by changing the length.

DISPLAY operator of DFSORT can report the value in MB or in GB also.

Hope this helps..

Thanks,
Kolusu
DFSORT Development
IBM Corporation

Cameron Conacher

unread,
Aug 3, 2021, 10:20:59 AM8/3/21
to
Four bytes binary to display numeric?
Starting-column,4,bi,EDIT=(TTTTTTTS)
Maybe be what you are looking for?

Packed date to display numeric?
Starting-column,4,PD,EDIT=(TTTTTTT)
Maybe what you are looking for?

If you want leading zeros use “T”
If you want leading zeroes as blanks use “I”.

Sent from my iPhone

> On Aug 3, 2021, at 9:17 AM, Steve Smith <sas...@gmail.com> wrote:
>
> I use a format item of E'9999.999' on the field specified as length 4, type

Jack Zukt

unread,
Aug 3, 2021, 11:11:47 AM8/3/21
to
Hi,
Thank you for you suggestions.
I am going to try them out.
Jack

Leon Trafalski

unread,
Aug 3, 2021, 7:55:43 PM8/3/21
to
This is what I use with ICETOOL to display dataset information.

HEADER('Data Set Name')        ON(029,44,CH) -
HEADER('#Ext')                 ON(082,01,BI) -
HEADER('Volser')               ON(083,06,CH) -
HEADER('BlkLen')               ON(089,02,FI) -
HEADER('RecLen')               ON(091,02,FI) -
HEADER('SpcAlc')               ON(093,04,FI) -
HEADER('SpcUsd')               ON(097,04,FI) -
HEADER('SecAlc')               ON(101,04,FI) -
HEADER('CreatDate')            ON(109,04,PD) -
HEADER('ReferDate')            ON(117,04,PD)
--
regards
Leon

Leon Trafalski
0400845899
0893432163
4 Varina Court
Alexander Heights
W.A. 6064
0 new messages