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
 

 

L SUB in Batch!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: L SUB in Batch!
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: 1445
Location: Azeroth

PostPosted: Fri Feb 15, 2013 12:40 pm    Post subject:
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    Post subject:
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: 1445
Location: Azeroth

PostPosted: Fri Feb 15, 2013 3:19 pm    Post subject:
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 http://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    Post subject:
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 http://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    Post subject:
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: 1445
Location: Azeroth

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

Hello,
You can try this link
http://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    Post subject:
Reply with quote

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

vasanthz wrote:
Hello,
You can try this link
http://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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm


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