IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

L SUB in Batch!


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
fredrick andrews

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Fri Feb 15, 2013 11:18 am
Reply with quote

Hi Experts...

CA-VIEW is a tool which stores the details/logs of the jobs / reports that ran.
Sometimes these logs also get migrated to TAPE.

To recall traditionally any dataset , we use HRECALL command ( May be specific to my site , but I've seen people talking about this elsewhere too).


To recall, the logs from CA-VIEW , we give L on the left command line and sub on the main command line which submits a job in the background to pull the dataset to disk.


My question:

Is there a way to do this entirely in batch.
I mean we give the job name, the generation, the date and stuffs explicitly in the job and submit it.


Thanks for your time.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Feb 15, 2013 12:40 pm
Reply with quote

Hello,
Quote:
Is there a way to do this entirely in batch.

The L SUB command already does the recall in batch. When you perform a L SUB command you can most likely see a batch job running under your owner ID which performs the recall.(PGM=SARBCH - CA supplied utility for reporting, printing and recalling for jobs/reports from CA-View with /LOAD or /PRINT commands)
Go to spool and grab that recall job and use it.

Is this what you are looking for?

Happy singletines day fellow amigos
Back to top
View user's profile Send private message
fredrick andrews

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Fri Feb 15, 2013 2:33 pm
Reply with quote

vasanthz wrote:
Hello,
Quote:
Is there a way to do this entirely in batch.

The L SUB command already does the recall in batch. When you perform a L SUB command you can most likely see a batch job running under your owner ID which performs the recall.(PGM=SARBCH - CA supplied utility for reporting, printing and recalling for jobs/reports from CA-View with /LOAD or /PRINT commands)
Go to spool and grab that recall job and use it.

Is this what you are looking for?

Happy singletines day fellow amigos


Vasanthz, you're right. It is batch.
But it shows only the job card information, not the entire job.
When I say 'Entirely Batch' I mean that I know a few jobs /reports that I'll have to check / view on a daily basis. So, I'm looking for a doing this entirely in batch. Hope I'm making myself clear.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Feb 15, 2013 3:19 pm
Reply with quote

Hello,
This is the recall job that gets submitted when you issue L SUB.
this recalls the job WELLSJB with gen = 5758 from tape.

Code:
//STEP1    EXEC PGM=SARBCH               
//SYSUDUMP DD SYSOUT=*                   
//SYSPRINT DD SYSOUT=*                   
//SYSIN    DD  *                         
/DBASE NAME=YOUR.SAR.DATABASE.NAME               
/LOAD GEN=05758 ID=WELLSJB SEQ=00001 TAPE


You can get the SAR database name from this thread www.ibmmainframes.com/viewtopic.php?t=58546&highlight=sarbch

But you would still have to know the correct GEN number which you want to recall.
GEN= parameter supports relative addressing by -1,-2 etc.. so it recalls latest GEN.

You can get more information of this from support.ca.com with the CA-View userguide, section "Loading output to Disk"
and CA-View reference guide section "Batch Processing".

Hope it helps.
Back to top
View user's profile Send private message
fredrick andrews

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Mon Feb 18, 2013 8:13 am
Reply with quote

vasanthz wrote:
Hello,
This is the recall job that gets submitted when you issue L SUB.
this recalls the job WELLSJB with gen = 5758 from tape.

Code:
//STEP1    EXEC PGM=SARBCH               
//SYSUDUMP DD SYSOUT=*                   
//SYSPRINT DD SYSOUT=*                   
//SYSIN    DD  *                         
/DBASE NAME=YOUR.SAR.DATABASE.NAME               
/LOAD GEN=05758 ID=WELLSJB SEQ=00001 TAPE


You can get the SAR database name from this thread www.ibmmainframes.com/viewtopic.php?t=58546&highlight=sarbch

But you would still have to know the correct GEN number which you want to recall.
GEN= parameter supports relative addressing by -1,-2 etc.. so it recalls latest GEN.

You can get more information of this from support.ca.com with the CA-View userguide, section "Loading output to Disk"
and CA-View reference guide section "Batch Processing".

Hope it helps.



Perfect ! Exactly what I was looking for.

Thanks a ton.

Regards!
Back to top
View user's profile Send private message
fredrick andrews

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Mon Feb 25, 2013 12:27 pm
Reply with quote

Hello Experts!

This ( The above solution) worked fine.
However, I have another concern.

When I use the relative addressing (-0) , I dont get the latest job from the CA-view pulled. the job actually abends.


When I checked it manually, the latest generation available for the job actually is gen (-3) .

So, I'm thinking of using the - Arch Date to specify to the job to pick.
Is that possible.

Any pointers??


Thanks in advance.

Regards!
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Feb 25, 2013 6:56 pm
Reply with quote

Hello,
You can try this link
ibmmainframes.com/viewtopic.php?t=52991&highlight=sarbch

If you are really desperate to automate the L SUB then you can try the below approach.

1. Run the SARBCH job with /LIST ID=JOBNAME* EXCP=A (refer link above for sample)
2. Write a program to parse the output from step 1 and get the GEN and SEQ numbers for the specified Arch date.
3. Generate /LOAD statements with GEN and SEQ obtained from Step 2.
4. another SARBCH step to load the jobs with the /LOAD statements generated in Step 3.

Hope it helps.
Back to top
View user's profile Send private message
fredrick andrews

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Tue Feb 26, 2013 2:33 pm
Reply with quote

This will definitely work
Thanks, I'll try it.

vasanthz wrote:
Hello,
You can try this link
ibmmainframes.com/viewtopic.php?t=52991&highlight=sarbch

If you are really desperate to automate the L SUB then you can try the below approach.

1. Run the SARBCH job with /LIST ID=JOBNAME* EXCP=A (refer link above for sample)
2. Write a program to parse the output from step 1 and get the GEN and SEQ numbers for the specified Arch date.
3. Generate /LOAD statements with GEN and SEQ obtained from Step 2.
4. another SARBCH step to load the jobs with the /LOAD statements generated in Step 3.

Hope it helps.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Batch install term/printer CICS 2
No new posts File Aid Batch IBM Tools 7
Search our Forums:

Back to Top