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



On 06-Sep-2015 11:25 -0600, CRPence wrote:
On 06-Sep-2015 01:49 -0600, gio.cot wrote:
I have problem with $-£-§ in running QSH commands; example if i
run

QSH CMD('rm -r NAS_TMP/$$X')

I receive :

rm: 001-2136 in relief error during the elimination of the
connection to the object NAS_TMP/354X. This path or address doesn't
exist.

<<SNIP>>

After posting my prior message, I realized that the dollar-sign was
being understood to be a dollar-sign. Therefore the special-meaning
of the $$ was the origin for the odd replacement characters in the
error message text; i.e. the effect was not due to character
translation, but the Process Identifier (PID) being inserted in place
of the $$. Had the PID been at least a couple digits more\longer, I
probably would have recognized that earlier.

Regardless, just as I had noted, the resolution specifically for the
typed dollar-sign character, is to escape those characters, to
insist that the interpreter treat those consecutive dollar-signs as
ordinary text\character instead of treating the dollar-sign as a
character with special meaning [e.g. incorrectly treated as the PID,
or as a variable-name]. The given request can produce the intended
effect, by issuing instead, the following modified request:

QSH CMD('rm -r NAS_TMP/\$\$X')


With a web search looking for a link that might help to better explain, I happened upon, ironically, the following discussion from earlier this year in which an additional means to circumvent is described as delimiting the name with apostrophes:

Code400 -The Support Alternative -> Iseries Programming Languages -> RPG/RPGLE -> QSH command Error with $$ caracther
Author: gio.cot
Date: June 1st, 2015
[http://www.code400.com/forum/archive/index.php?t-13687.html]

Thus another alternative, the given request can produce the intended effect, by issuing instead, the following modified request; of course the CMD() string being an apostrophe-delimited string, the apostrophes as delimiters for the name must be escaped with an apostrophe:

QSH CMD('rm -r ''NAS_TMP/$$X''')


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.