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



Numeric parms are 15.5 if you aren't using a command... Can't you define a numeric parm as other than 15.5 in a command?


Paul E Musselman
PaulMmn@xxxxxxxxxxxxx

.
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Art Tostaine, Jr.
Sent: Monday, January 22, 2018 3:22 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Using plink to call system commands via SSH mangling parms

When you call CL from a command line with numeric parameters aren't they
all considered 15.5?

Art

On Mon, Jan 22, 2018 at 3:17 PM, Richard Schoen <
Richard.Schoen@xxxxxxxxxxxxxxx> wrote:

Well for posterity sake here's what you can do if you can't write a CL
command wrapper and want to use plink.exe to run IBMi programs or commands:

Original
plink -ssh "user@1.1.1.1<mailto:user@1.1.1.1>" -pw pass1 /bin/system
'CALL PGM(LIB/PGM) PARM("A99 " "B22 ")'

Fixed with special characters (,), / and ' escaped with a backslash \ and
with double quotes around the entire command.
plink -ssh "user@1.1.1.1<mailto:user@1.1.1.1>" -pw pass1 /bin/system
"CALL PGM\(LIB\/PGM\) PARM\(\'A99\' \'B22\'\)"

I favor the CL command wrapper though.

Almost as ugly as *TCAT and *BCAT in CL.

FYI: You can feedback CL commands via SNDPGMMSG if you plan to send back
any CL responses from plink.exe

Regards,
/
[http://static.helpsystems.com/hs/email/templates/
signatures-final/images/hs-logo2.png]

Richard Schoen
Director of Document Management

e. richard.schoen@xxxxxxxxxxxxxxx<mailto:richard.schoen@xxxxxxxxxxxxxxx>
p. 952.486.6802
w. helpsystems.com<http://www.helpsystems.com/>
[cid:image002.jpg@01D1A545.4C2BF250]<http://www.linkedin.
com/in/richardschoen>[cid:image003.jpg@01D1A545.4C2BF250]<
http://www.twitter.com/richardschoen>




From: Richard Schoen
Sent: Monday, January 22, 2018 11:53 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Using plink to call system commands via SSH mangling parms

Hey All,

Interesting issue. Trying to use plink.exe to call CL commands from an SSH
session in Windows.

Call works, but parm data mangled.

Example that does NOT convert char parms correctly: REM plink -ssh "
user@1.1.1.1<mailto:user@1.1.1.1>" -pw pass1 /bin/system 'CALL
PGM(LIB/PGM) PARM("999 " "222 ")'

Example that does convert char parms correctly with character prefix in
each parm: REM plink -ssh "user@1.1.1.1<mailto:user@1.1.1.1>" -pw pass1
/bin/system 'CALL PGM(LIB/PGM) PARM("A99 " "B22 ")'

Apparently prefixing the character fields will cause the parm to convert
to character. But if parm is numbers the parm gets turned numeric and thus
the CL program interprets the parms as garbage.

I resolved the issue as usual by creating a CL command to front end the
call to the CL program.

However is there a way to force the correct parm conversion using
CALL/PARM instead ?

Thoughts appreciated.

PS: This is more for posterity as I'm sure others may run into this.

Regards,

[http://static.helpsystems.com/hs/email/templates/
signatures-final/images/hs-logo2.png]

Richard Schoen
Director of Document Management

e. richard.schoen@xxxxxxxxxxxxxxx<mailto:richard.schoen@xxxxxxxxxxxxxxx>
p. 952.486.6802
w. helpsystems.com<http://www.helpsystems.com/>
[cid:image002.jpg@01D1A545.4C2BF250]<http://www.linkedin.
com/in/richardschoen>[cid:image003.jpg@01D1A545.4C2BF250]<
http://www.twitter.com/richardschoen>




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD





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.