Re: variable in a sndpgmmsg?
Simon Coulter <shc-Q/[email protected]> Mon, 6 Apr 2009 08:28:01 +1000
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
On 06/04/2009, at 3:44 AM, Michael Bolland wrote:
> First, nice to meet you all - it's my first day with CL here and I was
> wondering if you could help debug a simple hello world type
> application
> that will eventually be an FTP transfer app.
Wrong list to ask this question. This list is for MI programming--not
CL. These question should be asked on the Midrange-L list. I've
answered it here in case you're not subscribed to Midrange-L but any
follow up questions should be asked there.
>
> MONMSG MSGID(CPF0000)
Don't do this. It's lazy. Search the midrange archives for a
discussion on proper exception handling.
> SNDPGMMSG MSG(&SAVF ' begins')
Syntactically incorrect. You're missing the concatenation operator.
Your source editor should have complained about this so I question
how you even managed to save such incorrect source. Refer to the CL
Programmer's Guide for information about concatenation.
>
> What's wrong with this? It won't even CRTCLPGM 'Program FTPTEST not
> created'
The compiler will tell you what's wrong if you examine the listing
produced. Probably error message CPD0047 - List or expression not
valid for parameter MSG.
>
> I also tried SNDPGMMSG MSG('&SAVF begins') which does CRT but just
> outputs literally '&SAVF begins'
Because the code did exactly what you said ... just not what you want.
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists
http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.