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
 

 

SMF and SAS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1504
Location: Chennai

PostPosted: Mon Feb 14, 2011 12:21 pm    Post subject: SMF and SAS
Reply with quote

Hi,

I am trying to extract smf records for a particular time period using the below program and write it to an external file,

Code:

/* &smfdd - input smf file
&sas_strt - required interval start time.
&sas_end - required interval end time.
outdd - output filename   */
data _null_;                                               
    infile &smfdd;                                         
    input @2 rectype pib1.                                 
          @3  smf_tm pib4.                                 
          @7  smf_jul pd4.                                 
          @11 sysid $char4. @;                             
                                                           
    if rectype = 2 or rectype = 3 then delete;             
                                                           
    sttime  = dhms(datejul(smf_jul+1900000),0,0,smf_tm/100);
                                                           
    if &sas_strt <= sttime <= &sas_end then do;             
          input;                                           
          file outdd;                                       
          put _infile_;                                     
    end;                                                   
run;                                                       


but in the output file the records are distorted,
I mean that the input and output file records does not look the same.

Could you please let me know what could be causing this?

I could post the input and output records, but they are not viewable, they are just ....'s and other funny symbols.

Thanks in advance,
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


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

PostPosted: Mon Feb 14, 2011 1:11 pm    Post subject:
Reply with quote

Put infile &smfdd; before your second input statement. At least that is what i always do. How about the dcb values for the output (lrecl,blkszie,recfm)?
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: Mon Feb 14, 2011 1:58 pm    Post subject:
Reply with quote

It may be worth looking at PGM=IFASMFDP to see if you can select on date / time criteria. Can't recall if you can, but think that you might.

It's all in the SMF manual
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Mon Feb 14, 2011 3:54 pm    Post subject:
Reply with quote

SMF data has human-readable fields but in general is not in human-readable format. You should expect to see lots of periods and other odd symbols since much of the data is bit-oriented.

Quote:
I mean that the input and output file records does not look the same.
What is different about them -- posting they don't look the same is like posting something doesn't work?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 15, 2011 12:16 am    Post subject:
Reply with quote

Hello,

Quote:
You should expect to see lots of periods and other odd symbols since much of the data is bit-oriented.

Suggest you open 2 screens and view the first record of the output file (HEX ON) in one screen and the matching input record (again HEX ON) to see what is different.

If this does not help clarify, use copy/paste and the "Code" tag to post these 2 records here and someone should be able to help.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1504
Location: Chennai

PostPosted: Tue Feb 15, 2011 2:36 pm    Post subject:
Reply with quote

Hello, Thanks for your inputs. I was trying to compare SAS output with IFASMFDP job output..and got confused with IFASMFDP,

I was trying to extract a time interval of data using the below IFASMFDP card from 13th Feb 10:00 hrs to 14th Feb 11:00 hrs.

Code:
  DATE(2011044,2011045)             ----> from 13th Feb 10:00 hrs to 14th Feb 11:00 hrs.           
  START(1000) END(1100)                   
  OUTDD(SMFOUT,TYPE(000:255))   
  INDD(SMFIN,OPTIONS(DUMP))


but turns out the job returned output of 13th Feb 10:00hrs to 13th Feb 11:00 & 14th Feb 10:00 hrs to 14th Feb 11:00 hrs.

However SAS job returned the correct time interval SMF data,
So comparing IFASMFDP output to SAS output led to the confusion & this topic.

This topic can be considered as resolved.

@Peter,
Quote:
Put infile &smfdd; before your second input statement


If the infile statement is placed before the second input statement, then the first input statement will not know where to read the data from. So it would not work correctly, or am I missing something?

Thanks,
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 15, 2011 10:29 pm    Post subject: Reply to: SMF and SAS
Reply with quote

Good to hear it is resolved - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Wed Feb 16, 2011 12:38 am    Post subject:
Reply with quote

Quote:

If the infile statement is placed before the second input statement, then the first input statement will not know where to read the data from. So it would not work correctly, or am I missing something?

Yes you do. Suppose you have more than 1 input file ?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1504
Location: Chennai

PostPosted: Thu Feb 17, 2011 11:05 am    Post subject:
Reply with quote

@Peter There is 1 input file and that is the input SMF file. Based on the time period specified to variables

&sas_strt - required interval start time.
&sas_end - required interval end time.

The records from input file are selected and written to output file outdd.

Regards,
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:



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