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

current batch plan


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jzhardy

New User


Joined: 31 Oct 2006
Posts: 91
Location: brisbane

PostPosted: Sun Sep 13, 2020 11:04 am
Reply with quote

does anyone have any COBOL (or SQL) to read the current (batch) application plan.

I've tried reading off 'current packageset' but this is blank.

Or is there some API to Z/OS ?
Back to top
View user's profile Send private message
jzhardy

New User


Joined: 31 Oct 2006
Posts: 91
Location: brisbane

PostPosted: Mon Sep 14, 2020 12:06 pm
Reply with quote

I’m trying to connect to db2 via DSNRLI

Here I invoke the thread:


Code:

CALL 'DSNRLI' USING CRTHRDFN PLAN       
COLLID REUSE         
RETCODE REASCODE.


PLAN (above) is the batch application plan


Then within this module I call the actual program (CLL-PROGRAM). It’s in this program that I need to access PLAN - however, I can't modify the imports to CLL-PROGRAM.


Code:

CALL CLL-PROGRAM USING                 
 WS-IEF-INPUT-PARM1                     
 WS-IEF-INPUT-PARM2                     
 WS-GLOBDATA                           
 MOVE RETURN-CODE TO SAVE-RETURN-CODE


Is there a way I get can properties off the current RRSAF thread
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2790
Location: NYC,USA

PostPosted: Mon Sep 14, 2020 3:07 pm
Reply with quote

And why would ever program needs to. Know the Db2 plan ?

Btw one way is you can query SYSIBM.SYSPACKAGE based on program name to get COLLID and then use that to query SYSIBM.SYSPACKLIST to get the Plan or join them in one query.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Sep 14, 2020 4:34 pm
Reply with quote

topic moved and cleansed. The duplicate has been deleted.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DSLIST in batch? JCL & VSAM 7
No new posts To get previous month from current ti... SYNCSORT 7
No new posts Write a current record plus previous ... DFSORT/ICETOOL 4
No new posts Mainframe batch Job or REXX to get VT... CLIST & REXX 7
No new posts File-aid batch how to repeat a line... Compuware & Other Tools 2
Search our Forums:

Back to Top