× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Trapping errors with CALLP?
  • From: Anton Gombkötö <Gombkoetoe@xxxxxxxxxx>
  • Date: Thu, 23 Dec 1999 19:23:33 +0100

Your opinion is your opinion, but i do think that the opposite of

><snip>That is why IBM recommends that we do not prototype program
calls.</snip>

is true.

Have a generous Santa,
Anton Gombkötö

----- Original Message -----
From: Alan Campin <Alan.Campin@CaseLogic.com>
To: <RPG400-L@midrange.com>
Sent: Thursday, December 23, 1999 5:44 PM
Subject: RE: Trapping errors with CALLP?


> >> I've run into a problem using CALLP ... I can't trap errors.
>
> This is a well documented fact when prototyping calls to programs. That is
> why IBM recommends that we do not prototype program calls. What I would
> recommend instead is to wrap the call in a function, preferably in a
service
> program, or copy block  and then you can just call it with a
> ExecCmd(String). I never call a QCMDEXC directly although I have a
> programmer who insists on putting QCMDEXEC logic in every single program
he
> writes. Drives me crazy.
>
> -----Original Message-----
> From: Rob Berendt [mailto:rob@dekko.com]
> Sent: Thursday, December 23, 1999 8:20 AM
> To: RPG400-L@midrange.com
> Subject: Re: Trapping errors with CALLP?
>
>
> 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.
>
>
>
>
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.