|
CALLP(E) and check %error
dgibbs@mks.com on 12/23/99 10:11:14 AM
Please respond to RPG400-L@midrange.com@Internet
To: rpg400-l@midrange.com@Internet
cc:
Fax to:
Subject: Trapping errors with CALLP?
Folks:
I've run into a problem using CALLP ... I can't trap errors.
When using a normal call I can put a conditioning indicator on the call so
that, if the called program fails, it simply returns to the caller and turns
on an indicator.
I can't find a way to do that will CALLP.
For instance ... the following code will work fine ... it just returns to
the command line after a call with a message in the joblog ...
D LEN S 15P 5
C eval CMD = 'ADDLIBLE ASDF'
C call 'QCMDEXC' 99
C parm CMD 128
C parm 128 LEN
C eval *inlr = *on
C return
However, this code throws a fit ...
DQCMDEXC PR EXTPGM('QCMDEXC')
D prCmdStr 4096A CONST
D prCmdLen 15P 5 CONST
D LEN S 15P 5
D CMD S 128A
C eval CMD = 'ADDLIBLE ASDF'
C callp QCMDEXC(CMD:128)
C eval *inlr = *on
C return
Any suggestions?
Thanks and have a happy & safe holiday!
david
--
David Gibbs
Sr. Software Engineer
Mortice Kern Systems US, Inc.
2500 S. Highland Ave., Suite 200
Lombard, IL 60148
phone: (630) 495-2108 x5004
http://www.mks.com <http://www.mks.com/>
mailto:dgibbs@mks.com <mailto:dgibbs@mks.com>
Opinions expressed are strictly my own and do
not necessarily reflect those of my employer.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.2919.6307" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT size=2><SPAN class=945195914-23121999>Folks:</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>I've run into a problem using
CALLP ... I can't trap errors.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>When using a normal call I can
put a conditioning indicator on the call so that, if the called program fails,
it simply returns to the caller and turns on an indicator.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>I can't find a way to do that
will CALLP.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>For instance ... the following
code will work fine ... it just returns to the command line after a call with a
message in the joblog ...</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>D
LEN
S 15P
5
<BR>C
eval CMD = 'ADDLIBLE
ASDF'
<BR>C
call
'QCMDEXC'
99
<BR>C
parm
CMD
128
<BR>C
parm
128
LEN
<BR>C
eval *inlr =
*on
<BR>C
return
</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>However, this code throws a
fit
...</SPAN></FONT></DIV>>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN
class=945195914-23121999>DQCMDEXC
PR
EXTPGM('QCMDEXC') <BR>D
prCmdStr
4096A
CONST
<BR>D
prCmdLen
15P 5
CONST
</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>D
LEN
S 15P
5
<BR>D
CMD
S
128A
<BR>C
eval CMD = 'ADDLIBLE
ASDF'
<BR>C
callp
QCMDEXC(CMD:128)
<BR>C
eval *inlr =
*on
<BR>C
return
</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>Any
suggestions?</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>Thanks and have a happy &
safe holiday!</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=945195914-23121999>david</SPAN></FONT></DIV>
<P><FONT size=2>--</FONT></P>
<P><FONT size=2>David Gibbs<BR>Sr. Software Engineer<BR>Mortice Kern Systems
US,
Inc.<BR>2500 S. Highland Ave., Suite 200<BR>Lombard, IL 60148</FONT></P>
<P><FONT size=2>phone: (<FONT size=2>630) 495-2108 </FONT>x5004<BR></FONT><FONT
color=#000000 size=2><A href="http://www.mks.com/">http://www.mks.com</A><BR><A
href="mailto:dgibbs@mks.com">mailto:dgibbs@mks.com</A><BR></FONT></P>
<P><FONT color=#000000 size=2>Opinions expressed are strictly my own and do
<BR>not necessarily reflect those of my employer.</FONT></P>
<DIV> </DIV></BODY></HTML>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.