Page 1 of 1

STRPCCMD Issues

Posted: Thu Oct 13, 2022 2:10 pm
by gageweldon
I have been working on a program that utilizes the start pc command to push commands in to a batch script.
However, the issue I have been running into is the 123 character limit. Some of the file names I am using can be quite long and the limit is not allowing me to push the full file path into my "pushd" command.

Breaking it up DOES work but having that many PCO sessions open and close just because of a character limit seems archaic to me. I am breaking up the commands and pushing them all into a batch script that is called at the end.

If there is any alternative or ideas, please feel free to let me know and thanks in advance!

Re: STRPCCMD Issues

Posted: Thu Oct 13, 2022 3:39 pm
by jonboy49
Check out this thread - lengthy discussion on the subject.

https://code400.com/forum/forum/iseries ... g-strpccmd

Re: STRPCCMD Issues

Posted: Fri Oct 14, 2022 4:12 pm
by gageweldon
I actually stumbled across that a couple days ago but sadly it didn't help my situation. My solution so far has been to keep a skeleton batch file in my host machine's emulator folder and call that batch script with parameters. The problem now is just the character limit of STRPCCMD being 123.

Re: STRPCCMD Issues

Posted: Fri Oct 14, 2022 4:25 pm
by Scott Klement
IBM increased the length of STRPCCMD a long time ago -- it hasn't been limited to 123 in years. It is 1023 characters since IBM i 7.2

What OS release are you on?

Re: STRPCCMD Issues

Posted: Fri Oct 14, 2022 4:37 pm
by gageweldon
Interesting, I must have not escaped something but I could have sworn it was just in the middle of a sentence where it chose to stop processing the command. I am on version 7.3 I believe.

It's been a couple of days since I've tried that exact command again so I haven't encountered that issue anymore since I have been working around it. But now I want to go see if I can replicate it.

Thanks for letting me know!

Re: STRPCCMD Issues

Posted: Fri Oct 14, 2022 4:45 pm
by Scott Klement
If the command allows more than 123 characters, but the PC is truncating it to 123 characters, it likely means you are running an old version of the emulation software that hasn't been upgraded to the 1023 limit yet.

Consider using the current version of IBM Access Client Solutions, it will support the longer command