STRPCCMD Issues

Discussions relating to writing software in ILE RPG (RPG IV). This includes both fixed and free format RPG.
Post Reply
gageweldon
Posts: 4
Joined: Thu Oct 13, 2022 1:57 pm

STRPCCMD Issues

Post 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!
jonboy49
Posts: 200
Joined: Wed Jul 28, 2021 8:18 pm

Re: STRPCCMD Issues

Post by jonboy49 »

Check out this thread - lengthy discussion on the subject.

https://code400.com/forum/forum/iseries ... g-strpccmd
gageweldon
Posts: 4
Joined: Thu Oct 13, 2022 1:57 pm

Re: STRPCCMD Issues

Post 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.
Scott Klement
Site Admin
Posts: 635
Joined: Sun Jul 04, 2021 5:12 am

Re: STRPCCMD Issues

Post 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?
gageweldon
Posts: 4
Joined: Thu Oct 13, 2022 1:57 pm

Re: STRPCCMD Issues

Post 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!
Scott Klement
Site Admin
Posts: 635
Joined: Sun Jul 04, 2021 5:12 am

Re: STRPCCMD Issues

Post 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
Post Reply