Re: variable in a sndpgmmsg?

"Mira, Antonio" <[email protected]> Mon, 6 Apr 2009 08:42:04 -0400
Newsgroups gmane.comp.lang.as400.mi
Message-ID <A332511C46856E4CB135D69A6F961560064BF75E@PRVPVSMAIL01.corp.twcable.com>
Hi,

You should use something like this

Chgvar &MSG value(&SAVF || ' begins')

&MSG being a new variable that you create.  You can also replace the || with *CAT (both concatenation operators)

Thank you,
 
Antonio Mira
 


P Go Green! Print this email only when necessary. Thank you for helping Time Warner Cable be environmentally responsible.
 
 
-----Original Message-----
From: mi400-bounces-Zwy7GipZuJhWk0Htik3J/[email protected] [mailto:mi400-bounces-Zwy7GipZuJhWk0Htik3J/[email protected]] On Behalf Of Michael Bolland
Sent: Sunday, April 05, 2009 1:44 PM
To: mi400-Zwy7GipZuJhWk0Htik3J/[email protected]
Subject: [MI400] variable in a sndpgmmsg?

Hello all,

 

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.

 

Source:

 

PGM        PARM(&TGTSYS &LIB &SAVF)          

DCL        VAR(&SAVF) TYPE(*CHAR) LEN(50)    

DCL        VAR(&LIB) TYPE(*CHAR) LEN(20)     

DCL        VAR(&TGTSYS) TYPE(*CHAR) LEN(20)  

MONMSG  MSGID(CPF0000)                       

                                             

SNDPGMMSG  MSG(&SAVF ' begins')              

 

END PGM

 

What's wrong with this? It won't even CRTCLPGM 'Program FTPTEST not created'

 

I also tried SNDPGMMSG  MSG('&SAVF begins') which does CRT but just outputs literally '&SAVF begins'

 

Sorry for the extremely newbie question, appreciate any replies

 

Regards

Michael Bolland

NF DC Operations
Tel: (01924) 831303
Email: Michael.Bolland-ORWA1i1ZGMcJ6kc456l0egC/[email protected] <mailto:Michael.Bolland-ORWA1i1ZGMcJ6kc456l0egC/[email protected]> 

 

P Please consider the environment before printing this e-mail

 


This electronic message contains information that is confidential and may be privileged.  This electronic message is intended for the use of the addressee(s) only.  If you are not the intended addressee, any disclosure, copying, distribution or use of the contents of this message is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality.

Although this electronic message and any attachments are believed to be free from any virus or other defect which might affect any system into which they are received or upon which they are opened, it is the responsibility of the recipient to ensure that they are virus free and to check that they will not adversely affect its systems and data. No responsibility is accepted by Northern Foods PLC (or any member of its group) for any loss or damage arising in any way from their receipt, opening or use.

Northern Foods Plc is registered in England with company number 471864.  Registered office: 2180 Century Way, Thorpe Park, Leeds LS15 8ZB. 
This E-mail and any of its attachments may contain Time Warner
Cable proprietary information, which is privileged, confidential,
or subject to copyright belonging to Time Warner Cable. This E-mail
is intended solely for the use of the individual or entity to which
it is addressed. If you are not the intended recipient of this
E-mail, you are hereby notified that any dissemination,
distribution, copying, or action taken in relation to the contents
of and attachments to this E-mail is strictly prohibited and may be
unlawful. If you have received this E-mail in error, please notify
the sender immediately and permanently delete the original and any
copy of this E-mail and any printout.
_______________________________________________
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.