Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DCOLLECT time stamp.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed May 05, 2010 3:16 pm    Post subject: DCOLLECT time stamp.
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, http://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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed May 05, 2010 3:18 pm    Post subject: Reply to: DCOLLECT time stamp.
Reply with quote

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

Global Moderator


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

PostPosted: Wed May 05, 2010 3:19 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed May 05, 2010 3:26 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed May 05, 2010 3:45 pm    Post subject: Reply to: DCOLLECT time stamp.
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 05, 2010 3:52 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed May 05, 2010 3:56 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed May 05, 2010 3:58 pm    Post subject: Reply to: DCOLLECT time stamp.
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: 1445
Location: Azeroth

PostPosted: Wed May 05, 2010 4:43 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed May 05, 2010 5:09 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 05, 2010 5:14 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed May 05, 2010 5:25 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 05, 2010 5:33 pm    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Wed May 05, 2010 6:15 pm    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed May 05, 2010 6:19 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Thu May 06, 2010 1:57 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts cics & real time monitoring icehat CICS 5 Wed Sep 07, 2016 2:29 am
No new posts Get system time in micro second or cl... lind sh CICS 11 Mon Sep 05, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us