View previous topic :: View next topic
|
Author |
Message |
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Hello All,
After the completion of a batch job(e.g a production job), due to MSGCLASS=J parameter, it moves to $avers(J=job will move to $avrs). Likewise, at the end of the day we have around 100 jobs in $avrs. I want like to develop a REXX tool to search a particular string in the job list of $avrs.
For example,
a FTP parm is KL0E34DT and i want to search this string in all the jobs which are in $avrs.
I searched the forum with keyword $avrs but did not find any. And this is my first topic, if I am making any wrong way to post this, please forgive.
Thanks,
Dev |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
the best place to start looking would be the $AVRS documentation ! |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Yes, i had a look but I did not find any way that how to Search a string in $avrs jobs. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
If the search function is not implemented by the product itself
What makes You think that using REXX You might overcame the design ? |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Actually, very frequently our managers ask us to know about the jobs using DB2 run parms or FTP parms or any dataset, and that job was run a few months ago like 60 days before. And we are provided the dataset names with expanded qualifiers.
e.g
G1KL00AP.GEAMS1.KL0K24D2.FUNDED.FILE
with qualifiers
&HLQ1..&LLQ1..&LLQ6..FUNDED.FILE
in this case it is quite time taking for us to get the job name. Infact, sometimes we failed to get the job names and we took help from Production control team. Well, i think its achievable thru CA7 but we have access to view the basic things like triggers, triggered , job dependency, calender of job run.
So i have decided to design a rexx tool so that it will helpful to our team.
Thanks,
Dev |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
You just told the why, but it does not help to get the solution
if the the product You are using does not provide the facilities You need
little can be done |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
All know that Rexx is a very powerful language and i think Rexx can help to achieve this.
Please suggest , if there is any other way to achieve this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
/repeat on
If the search function is not implemented by the product itself
What makes You think that using REXX(*) You might overcame the design ?
(*)or any other programming language
the power of a programming language is useless if You do not know the structure of the data You are going to manage
for example How do You plan to access the $AVRS repository
the question stands for any programming language |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
well, I have looked into the $avrs panels and from those panels, i got the date variable names. like SVSDATE,SVEDATE. And also i got the backup tape files where all the job information are available.
If we could get values in these $avrs variables for the date range then we may get those tape datasets and we could search the string.
Please correct, if the approach is wrong. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
the approach is independent of the programming language being used!
how do You plan to process the AVRS tapes ???
how much do You know about the AVRS internals for storing and retrieving data
since the amount of data seems huge REXX might not be the best tool |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
when i found the backup tape datasets , then i thought,this might be the way i can develop the this rexxl. But this will take a lot of time coz those datasets are having a huge means huge amout of data. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
looks like we are just wasting time!
how much do You know about the way AVRS stores it' s data
after You know that You will be able to understand if it is possible to process it
with an external program
until that time anything You think and say will be pure and useless speculation |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Why do you want to reinvent the wheel? Why not just use the $AVRS procedure that does this? The $AVRS install library member $AVRPULL is the specific member to scan $AVRS jobs and can search by date rate, job name, and / or specific string to find.
$AVRS uses VSAM files to store data, but I'm not sure if they are RRDS or KSDS. In any case, it would be a non-trivial task to write a REXX to process $AVRS data and anything you wrote would have to be tested every time a new version is installed, and possibly changed. |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Well Robert, i don't want to re invent the wheel...
$AVRS stores data in KSDS file(i found it in a $avrs backup job). I was looking about this $AVRPULL but not able to know, how to execute, what are the parms to pass.
I have got some code about $AVRSELR while restoring an archived job but did not find $AVRPULL.
Sorry for my inefficiency on this $avrs. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
Quote: |
I was looking about this $AVRPULL but not able to know, how to execute, |
since Your organization is licensed for the product the manuals should be available! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
This is SEA code, not mine:
Code: |
//*********** A PARM OF "NOBANNER" IS OPTIONAL TO SUPPRESS BANNERS
//*
//STEP001 EXEC PGM=$AVRPULL,REGION=768K ,PARM=NOBANNER
//*
//STEPLIB DD DSN=$AVR.rel#.LOADLIB,DISP=SHR -- $AVRS LOADLIB --
//*
//* -- $AVRS' DATA BASE --
//*
//$AVRLOCK DD DISP=SHR,DSN=$AVR.rel#.LOCK -- $AVRS LOCK --
//*
//* THE $AVRKSDS DD STATEMENT IS NO LONGER RECONIZED
//* THE $AVRRRDS DD STATEMENT IS NO LONGER RECONIZED
//*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//* $AVRWORK DD IS THE $AVRS TEMP WORK FILE. IT IS DYNAMICALLY
//* ALLOCATED UNLESS THE DD IS PRESENT IN THE JCL.
//*
//* $AVRWORK DD UNIT=SYSALLDA,SPACE=(CYL,(2,2))
//*
//********** ------- SELECT WORK TO: --------
//********** ------- VTAM PRINT -----
//*$AVRVPRT DD SDISP=SHR,DSN=PRTV.SAVRS.RRDS OR -------
//RSLOCAL DD SYSOUT=*
//*
//*** (RSLOCAL MAY BE MODIFIED AS SHOWN BELOW)
//*
//**RSLOCAL DD DCB=(LRECL=133,BLKSIZE=133,RECFM=FM),
//*** ===================> ------- SYSOUT -------
//*** SYSOUT=A ,HOLD=YES ------- OR -------
//*** ===================> ------- TO AN OLD DATASET -------
//* DSN=$AVRS.$AVRPULL.LIST,DISP=OLD --- OR ---
//*** ===================> ------- TO A NEW DATASET -------
//* DSN=$AVRS.$AVRPULL.LIST,DISP=(,CATLG,CATLG),
//* DCB=(LRECL=133,BLKSIZE=15476,RECFM=FBA),
//* UNIT=SYSDA,SPACE=(CYL,(25,1),RLSE)
//********** ------- INPUT CONTROL VIA ------
//********** ------- DATA SET - PARTITIONED -
//********** ------- OR - SEQUENTIAL -
//$AVRPCTL DD DSN=$AVR.rel#.CNTL(APDSNAME),DISP=SHR
//********** ------- OR SYSIN ------
//SYSIN DD *
ONEMATCH=YES
* ************ ONEMATCH=YES SELECT ONLY ONE MATCHING JOB
* ************ FOR EACH SELECTION CRITERIA BELOW
*
* ************ SELECT ALL JOBNAMES WITH PREFIX OF "SEA" THAT
* ************ RAN YESTERDAY BETWEEN 00:01 AND 23:59 HOURS
* ************ AND SEND PRINT TO VTAM PRINT QUEUE FOR PRINTER
* ************ P45F. (NOTE THAT THE $AVRVPRT DD STATEMENT
* ************ MUST BE UNCOMMENTED TO DO THIS).
*
*TYPE=JN,NAME=SEA,SD=-1,ED=-1,ST=0001,ET=2359,LUNAME=P45F
/*
// |
Note that you will need to work with your site support group to customize this JCL to reflect your site names for data sets and so forth. |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Thanks a lot Robert. I already asked my team about the manual of $avrs but seems they dont know.
I found the $avrpull job in my shop and also the libs and datasets.
Can you please give some parameter values in SYSIN.
Thank you very much you experts for this help. But i will again disturb you.. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The first scans the system log looking in the last week for the string HPER01; the second scans the jobs data base for 2 days of 2009 looking for a particular string, the third scans the archive history for 2 days of 2009 looking for any job name starting with DC:
Code: |
TYPE=SL,SD=-6,ED=*,FA='HPER01'
/*
//
TYPE=JN,SD=2009348,ED=2009349,FA='DCS.PROD.CSIXBURT'
/*
//
TYPE=AH,SD=2009243,ED=2009244,NAME=DC* |
If your site is having trouble finding the manuals, contact the vendor and get them sent again -- SEA has PDF versions of their manuals available on CD. |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Thank you very much Robert.. This wil help me a lot.
I have contacted the vendor for the manuals.
Thanks again to all the experts. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Glad to hear it helped. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I like the line:
Quote: |
All know that Rexx is a very powerful language and i think Rexx can help to achieve this.
|
This reminds me of "you are the great and powerful OZ. Certainly you can get me back to Kanasas". |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Pay no attention to that man behind the curtain. . . |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Hello,
Sorry to say that my senior team members said a big NO about the $AVRS manual.
I executed the $AVRPULL using parm
Code: |
//SYSIN DD *
TYPE=JN,SD=2010001,ED=2010226,FA='KLM014BC',NAME=G1KL**PM
|
as a result it gave only those job names which had been restored using R(restore) thru $avrs.
in sysprint
Code: |
$AVR719I - REQUEST SELECTED G1KLS6PM (J0017853)
$AVR719I - REQUEST SELECTED G1KLS6PM (J0017853)
$AVR719I - REQUEST SELECTED G1KLS6PM (J0026814)
$AVR719I - REQUEST SELECTED G1KLS6PM (J0026814)
$AVR719I - REQUEST SELECTED G1KLS6PM (J0011711)
$AVR719I - REQUEST SELECTED G1KLS6PM (J0011711)
|
In $avrs, here T means the job is Restored.
Code: |
ACT JOBNAME JOB # C ACK CCODE START DATE
T G1KLS6PM 0011711 J RC=0000 TUE 02 MAR
T G1KLS6PM 0011711 J RC=0000 TUE 02 MAR
T G1KLS6PM 0026814 J RC=0000 TUE 02 FEB
T G1KLS6PM 0026814 J RC=0000 TUE 02 FEB
T G1KLS6PM 0017853 J RC=0000 TUE 05 JAN
T G1KLS6PM 0017853 J RC=0000 TUE 05 JAN
|
when i used TYPE=AH, its not giving any job name and job ended up with RC=4. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
From the manual:
Quote: |
FA= or
SCAN= Defines an argument to be found or scanned for in the work. In
SYSLOG, each line continuing the argument is printed including any
multi-line or continued messages requested. For all other types of work,
if the argument is found, the entire work is printed. If the DDNAME=
selection parameter was also used for this scan, only the file is printed
instead of the entire work. This is a 30 byte field. If the argument
contains blanks, the argument must be enclosed in parentheses, single or
double quotes. This parameter is mutually exclusive with LO=. This
parameter is mutually exclusive with LUNAME for TYPE=SL.
Valid for Types: JN, TN, SN, SL
Shortest Abbreviation: FA or SC
Example: FA=TEXT |
FA is not valid for Archive History records. |
|
Back to top |
|
|
Devmishra
New User
Joined: 14 Jan 2010 Posts: 14 Location: India
|
|
|
|
Thanks a lot Robert.
Can't we Scan a string thru Archived history?
Well, is not there any way to get $avrs manual other than the vendor? |
|
Back to top |
|
|
|