All of a sudden we have a problem with STRPCCMD when trying to open a Word document. This forum is my last hope for a solution.
Analysis
When this code is executed the users get the error shown in attachment.
Code: Select all
01 //Start MS Word for blob
02 @cmdString = 'STRPCO';
03 callp(e) excCmd(@CmdString :%len(@CmdString));
04
05 @cmdString = 'STRPCCMD PCCMD(' + '''' +
06 'CMD /C START ' +
07 '\\' + %trim(@systeemNaam) +
08 %trim(@blob_name) + '''' +
09 ') PAUSE(*NO)';
10 excCmd(@CmdString :%len(@CmdString));
Code: Select all
01 //Start MS Word for blob
02 @cmdString = 'STRPCO';
03 callp(e) excCmd(@CmdString :%len(@CmdString));
04
05 sleep(10);
06
07 @cmdString = 'STRPCCMD PCCMD(' + '''' +
08 'CMD /C START ' +
09 '\\' + %trim(@systeemNaam) +
10 %trim(@blob_name) + '''' +
11 ') PAUSE(*NO)';
12 excCmd(@CmdString :%len(@CmdString));
![Wink ;)](./images/smilies/icon_e_wink.gif)
Another thing I tried was debugging the first block of code. I added a breakpoint at line 5, also wait a few seconds and then press F12 to execute the code. Of course, this also works fine. But when I close the Word document and the program puts the focus back on the debug I delete the breakpoint and press F12 again. The program returns to the screen of image 1. When I hit F2 again MS Word opens the document immediately and as long as I don’t close this session it works fine every time I open a document with STRPCCMD.
CONCLUSION
My assumption is that there is not really an authorization issue. When it should be authorization then the document will not open in any way.
I guess the problem must be in the direction of performance speed or maybe the commands are executed asynchronously, but honestly I am not sure.
It has always worked from the date of going into production, 5 July 2014. On the IBM iSeries nothing has been changed, I also checked this at the team responsible for system maintenance and at the external service provider responsible for machine maintenance, so I think it must be something outside of the IBM iSeries and because the error has been shown in windows explorer it looks like a MS Windows or MS Word error, but that also is a guess.
I hope someone can help.
Kind regards from the Netherlands,
Jan