View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
A DCOLLECT job was run with SYSIN,
Code: |
DCOLLECT OUTFILE(DCOUT) NODATAINFO VOLUMES(*) |
The first 24 columns of the output file are shown below, in HEX on mode.
Code: |
----+----1----+----2----+
----+----F----+----F----+
----+----1----+----2----+
------------------------
*************************
------------------------
.h..V ..XXXX..Øu...¬....S
0800E400CCEF018A01150000E
0800500113410D04102F00002
------------------------
.h..V ..XXXX..Øu...¬....S
0800E400CCEF018A01150000E
0800500113410D04102F00002
------------------------ |
DCOLLECT file attributes,
Code: |
Record format . . . : VB
Record length . . . : 644 |
I am trying to get Timestamp field from this data, but unable to get it.
The IBM link, publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.idai200/recstr.htm
has the record layout of DCOLLECT data, but the file shown above does not match with the description shown on the link.
Example,
The link says 'SYSTEM ID FOR THIS OPERATION' field is found in offset 8. But the file shown above has the SYSID XXXX at position 9.
Also it says that 'TIMESTAMP FIELD' can be found at offset 12. But I am unable to find it on the file.
Could you please say where im going wrong.
Thanks, |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
<position> = <offset> + 1 |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Well, displacements are often relative to zero. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thanks, That makes sense now.
May I know how to interpret that time stamp field? at offset 12.
the link says the Structure of the data is Character.
Regards, |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
looks like your read buffer can hold only one line of data
and/or the read lookahead capability is disabled
activate it with the command " set read lookahead 2 lines" and You will solve Your issue
in plain words
the timestamp is defined as a char field ( composite )
and for processing is divided in the two components of time and date part
and as per manual
Code: |
12(X'C') CHARACTER 8 DCUTMSTP TIMESTAMP FIELD
12(X'C') UNSIGNED 4 DCUTIME TIME IN SMF HEADER FORMAT
16(X'10') CHARACTER 4 DCUDATE DATE IN SMF FORMAT (CCYYDDDF) |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Not sure if I recall correctly, but take a good look at the format, I think it is time (4 bytes) in milliseconds since midnight and then 4 bytes for the date cc yy ddd F.
Oh, OK, it seems as though Enrico has less to do than I have |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
Thanks again for ur time, can u say how to execute the command/enable,
Quote: |
set read lookahead 2 lines. |
Regards, |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
my remark was an humorous one related to eye vision and brain buffering ...
and a humorous suggestion of reading also the following lines
in this case You stopped after reading the line with the 8 chars thing
and disregarded the two that followed with the important info |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Ok,
I have enabled my set read lookahead 2 lines command. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thanks all,
The info on the link makes sense now
Test SAS Program:
Code: |
options obs = 3;
data something;
infile 'XX.XX.XXX';
keep sttime;
format sttime datetime.;
input @13 time1 pib4.
@17 julian1 pd4.;
sttime = dhms(datejul(julian1+1900000),0,0,time1/100);
run;
proc print;
run; |
Output:
Code: |
Obs sttime
1 01MAY10:00:19:13
2 01MAY10:00:19:13
3 01MAY10:00:19:13 |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, I am intrigued. Why do you want to report on the date / time that the DCOLLECT data was collected. Or is this just gathering one piece of information for a report. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
The main task is to prepare statistics about DASD volumes each month.
The timestamp is required to validate if the DCOLLECT data belongs to current month. And process only if it is for current month else abort processing.
Regards, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Just checking |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Vasanth, you could also use
Code: |
INPUT @13 DCOLLDT SMFSTAMP8.
...
FORMAT DCOLLDT DATETIME22. ; |
SAS has a specific format for reading date/time stamp fields from SMF and DCOLLECT records. This reads the data as a SAS date/time field so you don't have to convert it before using it as a date/time field. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
You could use :
FORMAT DATE DATE9. TIME TIME.;
input @13 DATETIME SMFSTAMP8;
TIME = TIMEPART(DATETIME); DATE = DATEPART(DATETIME); |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
Back to top |
|
|
|