× 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.



Andrew,
Do not attempt to mix single-quotes and double-quotes.  And, never use "back-quotes."

Use only single quotes. (Single-quote is usually under the double-quote on many keyboards, unshifted).

Inside a quoted string, two single-quotes in a row means "one single-quote" inside the quoted string, vis:  
    'Mark''s name.'
Also, you can create a variable, e.g.:

DCL  VAR(&CMD) TYPE(*CHAR) LEN(512)          
DCL  VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(512)


Then, use CHGVAR to concatenate all the parts of your command, as follows:

  CHGVAR VAR(&CMD) VALUE('ssh -Tvvv -n USERID@MACHINE +   
    ''system ''''SBMJOB CMD(CALL PGM (MSBTRWRST/WASSTR) +   
    PARM(''''9.0.0'''' ''''S'''' '''' '''')) +              
    JOB(WASSTR_TST) HOLD(*YES) JOBQ(QUSRNOMAX)''')          


Then, before running it, echo it to the job log and interactive session as follows:

/* send command to job log */                            
   SNDPGMMSG  MSGID(CPF9898) MSGF(QSYS/QCPFMSG) +   
                MSGDTA(&CMD) TOPGMQ(*PRV (*)) +  
                MSGTYPE(*DIAG)                      
/* send command to screen ... */                            
   SNDPGMMSG  MSGID(CPF9898) MSGF(QSYS/QCPFMSG) +   
                MSGDTA(&CMD) TOPGMQ(*EXT) +  
                MSGTYPE(*STATUS)                     


Then, use QCMDEXC to run the command:
    CALL       PGM(QSYS/QCMDEXC) PARM(&CMD &CMDLEN)
    MONMSG     CPF0000 ...


Hope that helps,

Mark S. Waterbury

On Thursday, April 18, 2019, 9:33:37 AM EDT, Andrew Smith <Andrew.Smith@xxxxxxxxxxxxx> wrote:

Hello,

I’ve tried combinations of single quotes, double quotes etc but no avail.
The output sent to the log file says there is some about the . in 9.0.0 that it does like, but I am a loss
on how to fix it.

Thankyou

Regards
Andy



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.