I am trying to start a URL from a green screen session using the STRPCCMD. First off the URL will exceed the 123 character limit for STRPCCMD in version 7.1. I am having to split the URL and run the command using a .bat file. My issue is that the command is having issues with the ampersands in the URL that are used to pass parameters. Here is my code:
The error occurs at the "SET RESULT" of the split URL (see attached image).
I can do this with another URL if it has no ampersands but the ampersands are required here.
Any suggestions?
Thanks!
Code:
CHGVAR VAR(&URL) + VALUE('HTTP://hostname:8080/profoundui/start?pgm=TESTICSUI/SY0960+ &p1=' + *CAT &FTPKEY *TCAT + '&l1=30&workstn=ICSUI0326&suffixid=1') CHGVAR VAR(&URL_1) VALUE(%SUBSTRING(&URL 1 60)) CHGVAR VAR(&URL_2) VALUE(%SUBSTRING(&URL 61 120)) CHGVAR VAR(&FIRST) VALUE('CMD /C ECHO SET' *BCAT + '"' *CAT 'FIRST=' *TCAT &URL_1 *TCAT + '"' *BCAT '> C:\TEMP\URL.BAT') CHGVAR VAR(&LAST) VALUE('CMD /C ECHO SET' *BCAT + '"' *CAT 'LAST=' *TCAT &URL_2 *TCAT + '"' *BCAT '>> C:\TEMP\URL.BAT') STRPCO PCTA(*NO) MONMSG MSGID(IWS4010) STRPCCMD PCCMD('DEL C:\TEMP\URL.BAT') STRPCCMD PCCMD(&FIRST) STRPCCMD PCCMD(&LAST) STRPCCMD PCCMD('CMD /C ECHO SET RESULT=%FIRST%%LAST% + >> C:\TEMP\URL.BAT') STRPCCMD PCCMD('CMD /C ECHO Start iexplore.exe + %RESULT% >> C:\TEMP\URL.BAT') STRPCCMD PCCMD('START C:\TEMP\URL.BAT') PAUSE(*NO)
Comment