I think it matters if you care that "it didn't work" is different from "It ONLY didn't work because the command is too long."

"It didn't work" could be a number of issues while "command too long" is only possible if the emulator isn't the correct one.

If I was doing this on IBM i I would create some command like TESTCMDLEN with one parm that has a default value of *SHORT but send it as TESTCMDLEN <120 spaces> LEN(*LONG). This way the parameter gets cut off cleanly on the short emulator thus returning *SHORT. That's definitive then. I would guess that you could do the same thing in a DOS batch file but my DOS batch files skills would require use of the the google.

- Larry "DrFranken" Bolhuis

www.Frankeni.com
www.iDevCloud.com - Personal Development IBM i timeshare service.
www.iInTheCloud.com - Commercial IBM i Cloud Hosting.

On 8/21/2015 10:03 AM, John Yeung wrote:

To expand on Rob's points:

If it's possible to accomplish your PC task using the shorter string,
then why not just use it, and not worry about which emulator is being
used?

If that's not possible, but it's possible to detect failure, then just
use the long string and give a message if it doesn't work.

The only case where there's a real benefit to detecting the emulator
would thus be when you can't use a short string AND you can't detect
failure. It seems unlikely to me that you can't detect failure, yet
you can detect specific enough emulator information. But I'm just
shooting from the hip here.

John Y.

On Fri, Aug 21, 2015 at 8:50 AM, <rob@xxxxxxxxx> wrote:
So how does one code for that, if you could determine the emulator in use?

If they are not using the latest then send them the big string, otherwise
send them a message: "Your current terminal emulator is unable to run
this option. Please contact the help desk to get an upgrade if this
support is necessary."? Well, I guess that's one way to get the help desk
moving.

An alternative is to figure out how to get a shorter string to work.

Is there a MONMSG you can put on the STRPCCMD which will say "the command
was truncated" or some such thing?

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-2019 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].