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
 

 

REXX to Find a string in the executed jobs from $AVRS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Devmishra

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 11:25 am    Post subject: REXX to Find a string in the executed jobs from $AVRS
Reply with quote

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. icon_smile.gif

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Mar 19, 2010 11:35 am    Post subject: Reply to: REXX to Find a string in the executed jobs from $A
Reply with quote

the best place to start looking would be the $AVRS documentation !
Back to top
View user's profile Send private message
Devmishra

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 11:54 am    Post subject:
Reply with quote

Yes, i had a look but I did not find any way that how to Search a string in $avrs jobs.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Mar 19, 2010 11:58 am    Post subject: Reply to: REXX to Find a string in the executed jobs from $A
Reply with quote

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

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 12:21 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Mar 19, 2010 12:27 pm    Post subject: Reply to: REXX to Find a string in the executed jobs from $A
Reply with quote

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

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 12:35 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Mar 19, 2010 12:46 pm    Post subject: Reply to: REXX to Find a string in the executed jobs from $A
Reply with quote

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

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 12:59 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Mar 19, 2010 1:04 pm    Post subject: Reply to: REXX to Find a string in the executed jobs from $A
Reply with quote

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

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 1:11 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Mar 19, 2010 1:19 pm    Post subject: Reply to: REXX to Find a string in the executed jobs from $A
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Mar 19, 2010 4:00 pm    Post subject:
Reply with quote

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

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 4:22 pm    Post subject:
Reply with quote

Well Robert, i don't want to re invent the wheel... icon_smile.gif

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Mar 19, 2010 4:36 pm    Post subject: Reply to: REXX to Find a string in the executed jobs from $A
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Mar 19, 2010 4:41 pm    Post subject:
Reply with quote

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

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 5:16 pm    Post subject:
Reply with quote

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.. icon_smile.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: Fri Mar 19, 2010 5:30 pm    Post subject:
Reply with quote

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

New User


Joined: 14 Jan 2010
Posts: 14
Location: India

PostPosted: Fri Mar 19, 2010 5:36 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Mar 19, 2010 6:25 pm    Post subject:
Reply with quote

Glad to hear it helped.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm


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