× 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: multi layer prob.
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Tue, 6 Oct 1998 13:27:27 -0500

The sample I sent you, with the chkobj and monmsg, is all CL program.  RPG is 
generally a fixed format language, with some exceptions to prove the rule.

If you want 'any fields' from the DSPOBJD displayed then what you'll have to do 
is get the data yourself and display them.  There are a number of ways to do 
this:

Do you have Query?  To test try: WRKQRY   If this command works then you have 
Query.  Try figuring out how to use it.  You can embed RUNQRY into a CL 
program.  You can also embed RUNQRY into a RPG program with CALL QCMDEXC.

If you do not have Query then you can enter the following line into a source 
member:
SELECT * FROM lib/file
Where the lib/file was created by the DSPOBJD.  Then run CRTQMQRY against this 
source member.  Then you can embed STRQMQRY in your program.

Or you can use RPG to read the file and display the records in a subfile on the 
screen.





mohammadakhan@yahoo.com on 10/06/98 01:01:26 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Subject:        Re: multi layer prob.


---Rob Berendt <rob@dekko.com> wrote:
>
> Learn to love the MONMSG command.  If you come from a PC Dos
background then the closest comparison is the IF ERRORLEVEL command
from DOS.  What version of OS/400 are you running?  If you are running
V4R2 or above you can do the following with any AS/400 command:

actually, when i looked at a compile listing i'm running on V3R2M0.
 
> Sample on how to use this:
> CHKOBJ OBJ(&LIB/&OBJ)   OBJTYPE(&OBJTYP) 
> MONMSG MSGID(CPF9801)   EXEC(DO)
> /*  Insert your logic here  */
> ENDDO

something like this goes on in the RPG pgm. i take it.

> I have no idea what info you want displayed from this file on the
screen.

"any fields" generated from the CALL QCMDEXC in the QTEMP file will be
displayed on the 2nd screen.

Mohammad

 
> mohammadakhan@yahoo.com on 10/05/98 09:33:11 
> 
> hi, I'd like some help, if anyone is willing.
> 
> 1-does CHKOBJ command only work in a CL program?
> 2-how does a CL pgm. execute a command that displays an error mssg.
> for instance?
> 3-how does CALL QCMDEXC in rpg pgm. execute the DSPOBJD command so
> that a temporary output file in QTEMP is created?
> 
> basically i'm working on a pgm. that a user inputs an obj. name, lib.,
> and obj. type.
> 
> if the obj. does not exist CL pgm activates error msg.
> 
> if the obj. does exist then the temporary file created in QTEMP by
> CALL QCMDEXC (that activates DSPOBJD cmd)
> should have some of its info displayed on an output screen.
> 
> hope this makes sense.
> 
> Mohammad
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

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


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 ...


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.