Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running an internal function in Batch mode

Status
Not open for further replies.

rajesh082

Programmer
Dec 18, 2007
38
DK
Hi All,

Function A
Code:
Address ISPEXEC                                           
"LMDINIT LISTID(LISTID) LEVEL("SrchPDS")"                 
If rc > 0 then return 0                                   
                                                          
Do Forever                                                
 "LMDLIST LISTID("LISTID") DATASET(DSNAME) OPTION(LIST)"  
 If RC > 0 Then                                           
  Leave                                                   
                                                          
If RC = 0 Then Do                                        If  (SysDsn("'"DSNAME"("Jobname")'") = OK ) Then Do  
 say "Found in... "dsn                               
 f       = f + 1                                     
 Found.f = DSNAME   
End

Function B
My function B reads all the members from the stem Found & writes them in a single Report PS, One by One.

I have 2 Queries:-
1) Is it Possible that my function A runs in foreground & my function B runs in Background (or in batch mode). If yes How do I achieve it? I know I can write function B as an external one & submit it as a JCL, but is it possible to submit an internal function as a Job?

2) If I can run Function B in Batch mode, Is it possible that when the job gets finished I can execute the ISPF View Command to show the generated Report. In other words, I want to show the user the generated report, rather than telling him that the job has executed successfully.

I dont need the code for this, I just need any helpful pointers regarding this. Any help will be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top