MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SAR utilities

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Mon Dec 02, 2002 8:34 am    Post subject: SAR utilities Reply with quote

To save a JOB LOG or Report from SAR use following JCL
Code:

//STEP1     EXEC PGM=SARBCH
//SYSPRINT  DD SYSOUT=*
//LISTOUT1  DD DSN=userid.SARC,
//             DISP=(,CATLG,DELETE),
//             DCB=(LRECL=151,BLKSIZE=0,RECFM=FBA)
//SYSIN     DD *
/DBASE NAME=sardatabasename
/PRINT ID=jobname GEN=4352    DDNAME=LISTOUT1  SEQ=2286
/*
//
/LOAD ID=jobname GEN=4352    DDNAME=LISTOUT1  SEQ=2286
//* IF YOU USE LOAD INSTEAD OF PRINT YOU CAN AVOID THE BANNER


To save the index of SAR
Code:

//STEP1     EXEC PGM=SARBCH
//SYSPRINT  DD SYSOUT=*
//REPORT    DD DSN=userid.SARC,
//             DISP=(,CATLG,DELETE),
//             DCB=(LRECL=151,BLKSIZE=0,RECFM=FBA)
//SYSIN     DD *
/DBASE NAME=sardtabasename
/LIST  GEN=*  ID=jobname*
/*


You can use wildcards for ID
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
bscott
Beginner


Joined: 02 Dec 2002
Posts: 2
Topics: 0
Location: Springfield, IL

PostPosted: Mon Dec 02, 2002 9:14 am    Post subject: Reply with quote

Code:
/PRINT ID=jobname GEN=4352    DDNAME=LISTOUT1  SEQ=2286

It's important to note that the GEN and SEQ are specific to whichever report is being pulled out.
Back to top
View user's profile Send private message Send e-mail
Hariharan78
Beginner


Joined: 01 Dec 2002
Posts: 28
Topics: 8
Location: India

PostPosted: Mon Dec 02, 2002 11:35 pm    Post subject: Reply with quote

Hi all,
Using SARBCH we can select all the columns that are displayed in the SAR.Is it possible to select only the JobNAME , DATE AND TIME Only.

Bye
_________________
S.Hariharan
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Tue Dec 03, 2002 5:11 am    Post subject: Reply with quote

Hariharan,
I don't know whether SARBCH can do that. However you can use the second JCL to save the index to a dataset and use SORT to extract the coulmns you need.

Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Dec 03, 2002 11:15 am    Post subject: Reply with quote

As Sjreejith points out, once you create a sequential file, you can use DFSORT/ICETOOL to create a report or extract specific columns. If the file is RECFM=FBA, the first position will contain a carriage control character, so the data starts in position 2.

If you just want to extract selected fields to another data set, you can do that using DFSORT's INREC, OUTREC or OUTFIL OUTREC statement. For example:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
  OUTREC FIELDS=(p1,m1,p2,m2,p3,m3)
/*


where p1,m1 is the starting position and length of the jobname, p2,m2 is the starting position and length of the date, and p3,m3 is the starting position and length of the time. Many editing options are available with INREC, OUTREC and OUTFIL OUTREC.

If you want to print a report with the extracted fields, you can use the DISPLAY operator of DFSORT's ICETOOL to do that quite easily. For example:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...   input file
//RPT DD SYSOUT=*
//TOOLIN DD *
  DISPLAY FROM(IN) LIST(RPT) BLANK -
    HEADER('Jobname') ON(p1,m1,f1) -
    HEADER('Date') ON(p2,m2,f2,formatting) -
    HEADER('Time') ON(p3,m3,f3,formatting)
/*


DISPLAY offers lots of options for formatting the report and its fields.

For more information, you can access the DFSORT books online from:

http://www.storage.ibm.com/software/sort/mvs/srtmpub.html

In particular, see "DFSORT Application Programming Guide" which describes all of the DFSORT and ICETOOL statements in detail.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rahull
Beginner


Joined: 29 Jan 2004
Posts: 62
Topics: 19

PostPosted: Thu Oct 28, 2004 2:27 am    Post subject: Reply with quote

Hi,

Please clarify my doubt.
Code:

//STEP1     EXEC PGM=SARBCH
//SYSPRINT  DD SYSOUT=*
//REPORT    DD DSN=T925.BANSALR.SAR,
//             DISP=(,CATLG,DELETE),
//             DCB=(LRECL=300,BLKSIZE=0,RECFM=FBA)
//SYSIN     DD *
/DBASE NAME=SARSTC.SERVICE
/LIST  GEN=*  ID=$F51W5CR*
/*


The above JCL is not listing all the columns of SAR.

Following is the list of columns it displays ::
ID JOBNAME JOBID GEN SEQ ARC DATE ARC TIME PRT DATE PRT TIME LOC LINES PAGES BLOCKS FORMNAME.

I am looking for the column "READ DATE/TIME".

Please advice.
Back to top
View user's profile Send private message
YSMVS
Beginner


Joined: 19 May 2004
Posts: 51
Topics: 25
Location: My House

PostPosted: Thu Oct 28, 2004 9:48 pm    Post subject: Reply with quote

Hi Sreejith,

Can you please tell me how to find the SAR database name ?

THX,
YSMVS
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Fri Oct 29, 2004 12:48 am    Post subject: Reply with quote

Go into SDSF, DA and look for the Sar started task, it might be View.., it might be SAR... This all depends upon your shop. Once you find the started task you will find the dataset name qualifiers in the PARM. For example:
IEFPROC EXEC PGM=SARSTC,PARM='CAXXX1.NSHR.VIEW,&OPT',
The Sardatabase will be called CAXXX1.NSHR.VIEW.SARDBASE.D0000...
Back to top
View user's profile Send private message Visit poster's website
kumarsivarajan
Beginner


Joined: 23 Sep 2003
Posts: 13
Topics: 2
Location: chennai

PostPosted: Wed Oct 12, 2005 4:01 am    Post subject: Reply with quote

Frank Yaeger,

Can you able to tell me in your ICTOOL Methord ON(p1,m1,f1)
what is the value we want to use f1,f2,f3 ?

Thanks
Kumar
_________________
the total world is equal to pure knowledge
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Oct 12, 2005 4:25 am    Post subject: Reply with quote

Kumarsivarajan,

Click on the "quick manuals" link on the top of this page. Scroll to "Utilities" section. Now click on DFSORT Application Programming Guide. Read chapter 6.0 Using ICETOOL which will answer your queries.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Oct 12, 2005 9:46 am    Post subject: Reply with quote

Kumar,

f1, f2 and f3 represent formats. If the data is character, you would use CH format. If the data is numeric, you would use the numeric format (e.g. PD, ZD, BI, FI, FS, UFF, SFF) that corresponds to the way the data is stored. You can also use various SMF, TOD and ETOD date and time formats if that's what the data represents.

For complete details on the DISPLAY operator of DFSORT's ICETOOL, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/6.7?DT=20050222160456
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kumarsivarajan
Beginner


Joined: 23 Sep 2003
Posts: 13
Topics: 2
Location: chennai

PostPosted: Thu Oct 13, 2005 6:31 am    Post subject: Reply with quote

Frank Yaeger,

Thank you very much for your help.
Your links are very much usefull for biginners.

Thanks
KUMAR
_________________
the total world is equal to pure knowledge
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group