Hi All,
Function A
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.
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.