×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Tim

Very cool!

Now, if you have more than one parameter that can be returned, be sure to put a test in for whether the parameter was actually set. Otherwise you have to include ALL the returned parameters, and this is not how IBM's RTV* commands work. There was a recent discussion on this - I tend to put in a MONMSG MCH3601 at the first touch of the parameter in question. If I get that message, I skip the processing.

Search for that message description in the archives - there was a suggestion to use an API to check the parameter, but someone mentioned problems with that approach.

HTH
Vern

tim wrote:
Thanks all...working great!!!


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent: Tuesday, October 27, 2009 1:08 PM
To: Midrange Systems Technical Discussion
Subject: Re: creating a command that returns a value

PARM KWD(RTNMBR) TYPE(*CHAR) LEN(10) RTNVAL(*YES)

be aware that any command that returns a value can't be run interactively and you'll have to specify that when you compile the command.


Thanks,
Tommy Holden



From: "tim" <tim2006@xxxxxxxxxxx>
To: <midrange-l@xxxxxxxxxxxx>
Date: 10/27/2009 11:59 AM
Subject: creating a command that returns a value
Sent by: midrange-l-bounces@xxxxxxxxxxxx



Can someone show me how to return a value from a home grown command.

Here is the command I crearted:


Spool File Name . . . . . . . . Name


Job . . . . . . . . . . . . . . * Name, *


User . . . . . . . . . . . . . . Character value


Job Nbr . . . . . . . . . . . . 000000-999999


Spool Nbr . . . . . . . . . . . *LAST 1-999999, *ONLY, *LAST


Return member...

I will be using the command as follows:

SAVSPL2PF SPLF(QSYSPRT) rtnmbr(&mbr)



I would like the command to process and return a value in the &mbr parm. Is
this possible?



This thread ...

Replies:

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

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