Passing Reply through CL to COBOL program

  • Follow


I have a CL that runs multiple COBOL programs.  One of the programs
takes in files and if a you take in a file with the same name, which
is normal for some clients, it asks if you want to continue and
processing.

The problem is, some clients would rather not have to monitor the CL
and if they have already verified the files before processing, they
already know it is a different file.

Is it possible to send the Reply back to the COBOL program via the CL,
rather than having to have the Operator monitor the job and manually
Reply?

Here is an example of how the COBOL program is RUN in the CL.

RUN   PGM(ACCTPROGS/PROCTRANS) +
              OPTIONS('FILE=ABC123')

0
Reply 67cougarxr7 (1) 11/13/2009 12:14:19 AM

CougarXR7 wrote:
> I have a CL that runs multiple COBOL programs.  One of the
> programs takes in files and if a you take in a file with the same
> name, which is normal for some clients, it asks if you want to
> continue and processing.

   "take in"?  Passed as a parameter, and an OPEN is performed 
against the named file?
   "it"?  One of the COBOL programs?
   "asks"?  In what manner?  QMHSNDxx to send an inquiry?
   "continue and processing"?  Presumably, continue processing?

   Does a CLP call a CBL program that calls another CBL, or are 
there successive calls of CBL programs in the CLP?  What do the 
programs do to the files, and what are the messages and the means 
for /asking/ and manually replying [e.g. a user display file 
prompts, or a\which system interface prompts]?

> The problem is, some clients would rather not have to monitor the
> CL and if they have already verified the files before processing,
> they already know it is a different file.

   "monitor" as in MONMSG, or as in remaining at an interactive 
terminal awaiting prompting for the /reply/?
   "CL" as in CL command in the CLP, or the running CLP?

> Is it possible to send the Reply back to the COBOL program via
> the CL, rather than having to have the Operator monitor the job
> and manually Reply?

   SNDRPY would be a manner to reply to an *inquiry* message, but 
not from within the program which is the caller of a called program 
that is prompting for & awaiting a response\reply.  If the reply is 
by some other means than the OS message handling, that processing 
needs to be described for worthwhile comment.  If within a program 
where the [first or later] callee sends an inquiry message & then 
awaits a reply, the INQMSGRPY() [inquiry message reply] handling for 
the job plus the assigned reply value would determine how to reply 
to a MSGTYPE(*INQ) [e.g. parameter specification for /inquiry 
message/ as seen on SNDPGMMSG CL command].

> Here is an example of how the COBOL program is RUN in the CL.
> 
> RUN   PGM(ACCTPROGS/PROCTRANS) OPTIONS('FILE=ABC123')
> 

   There is no OS "RUN" CL command.  Any worthwhile response will 
likely require knowing what the RUN command is doing.  There seems 
little specific details about what transpires in the scenario, as 
described in the quoted text.  Perhaps a spooled joblog with CL 
command logging [LOGCLPGM(*YES)] might contain something that better 
describes the scenario, rather than just descriptive text.

Regards, Chuck
0
Reply CRPence 11/13/2009 2:52:40 AM


1 Replies
245 Views

(page loaded in 0.045 seconds)

Similiar Articles:













7/29/2012 10:50:27 AM


Reply: