IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DCOLLECT time stamp.


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed May 05, 2010 3:16 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed May 05, 2010 3:18 pm
Reply with quote

<position> = <offset> + 1
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed May 05, 2010 3:19 pm
Reply with quote

Well, displacements are often relative to zero.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed May 05, 2010 3:26 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed May 05, 2010 3:45 pm
Reply with quote

looks like your read buffer can hold only one line of data icon_biggrin.gif
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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 3:52 pm
Reply with quote

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 icon_lol.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed May 05, 2010 3:56 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed May 05, 2010 3:58 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed May 05, 2010 4:43 pm
Reply with quote

Ok,

I have enabled my set read lookahead 2 lines command. icon_biggrin.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed May 05, 2010 5:09 pm
Reply with quote

Thanks all,
The info on the link makes sense now icon_biggrin.gif

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 5:14 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed May 05, 2010 5:25 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 5:33 pm
Reply with quote

Just checking icon_lol.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed May 05, 2010 6:15 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed May 05, 2010 6:19 pm
Reply with quote

You could use :

FORMAT DATE DATE9. TIME TIME.;

input @13 DATETIME SMFSTAMP8;

TIME = TIMEPART(DATETIME); DATE = DATEPART(DATETIME);
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu May 06, 2010 1:57 am
Reply with quote

Quote:
SMFSTAMP8


Is slick icon_biggrin.gif



icon_pray.gif --> SAS
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top