Passing Parms to CL

george.j.wen@us.abb.com george.j.wen@us.abb.com
Wed, 23 Aug 2000 14:04:13 -0500



Hello all in PH land,

This is a PH-AS/400 question.  There's not a whole lot in the manuals
about using PH in batch.  I'm hoping someone has experience here.
I'm passing parameters via the creation of a disc file.  A screen calls
a CL that executes a Quiz programs that prompts the user for some,
let's say dates for sake of example.  I don't want to run the report
interactively so I submit another CL to batch.  This 2nd CL runs the
Quiz report.  The Quiz report does a "Use" to the disc file to get the
dates (i.e. select statement).

This all works fine provided I don't put the disc file in the QTEMP
directory.  The batch job uses a different QTEMP (or session in my
mind) than the user used when he/she created the disc file hence it
can't be found by the Quiz program in the batch process.  We'd like
to use QTEMP for the very reason that it is temporary.  This would
be the security blanket we need to prevent 2 users from simultaneously
trying to use the disc file with a 2nd user possibly over-writing the file
of the 1st user before the batch job has had a change to run.  This is
currently a possibility as we put the disc files in library ABBPHSRC.
Is there a way for us to be able to use QTEMP in the batch job??
If not maybe we could name the disc file with a user name or time
stamp, but then how would the Quiz program in the batch job know
the disc file name?  Is there a way to pass this?  Or is there a better
way entirely for handling prompting and parameter entry with PH on
the AS/400?

I hope this is clear.
Here's a kind of outline for clarity:

     Menu - Calls Job1
                   Job1 executes Quiz Prog1 (interactive)
                           Quiz Prog1 prompts the user for dates
                         and writes a Disc File with a select
                         statement.
                  Job1 submits Job2 to Batch
                  Job2 executes Quiz Prog2 which is the report.
                                                                      Quiz Prog2
'Uses' the Disc File

Thanks,

George W (not running for Pres.


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.