H DEBUG(*YES) H nomain **************************************************************** * PROGRAM NAME - SC0085RM * * * * FUNCTION - This is a module designed to support external * * help processes for the softcode system * * * * PROGRAMMER - STEVE CROY 04/11/06 * **************************************************************** * Format for string instructions: * * * * START http://www.isoftwerks.net/ * * ndll32 shell32,ShellExec_RunDLL http://www.isoftwerks.net/ * * * * START will execute, DOS prompt will show briefly * * Shell DLL will execute, DOS window will not show * **************************************************************** FSCHURLPF IF E K DISK USROPN *--- /copy qrpglesrc,sc0000_pr *--- D PGMDS ESDS EXTNAME(SCPSTSPF) P ShowHelp B export D ShowHelp PI N D AppName 10 CONST DExecCmd PR EXTPGM('QCMDEXC') D Command 256 D Length 15 5 D StrPCcmd C 'strpccmd pccmd(' D apos S 1 INZ(')') D Command S 256 D Default S 10 INZ('*DFT') D ErrorMsg S 255 INZ('Command not valid') D ErrorMsg2 S 255 INZ('No help defined for - D this application') D Errorttl S 27 INZ('Error SC0085RM Message') D L S 15 5 D NoError S n D NoURL S n D NotStarted S 255 INZ('PC command environment - D not started') D qNameO S 256 varying D qt S 1 INZ('''') D String S 256 D StrPCO S 256 INZ('strpco pcta(*no)') /free string = *blanks ; NoError= *on ; IF not %open(SCHURLPF) ; OPEN SCHURLPF ; ENDIF ; CHAIN AppName SCHURLPF ; IF not %found(SCHURLPF) ; CHAIN Default SCHURLPF ; IF not %found(SCHURLPF) ; ErrorMsg = msgtxt ; // DisplayMessage( ErrorMsg2 : errorttl ) ; NoError= *off ; ENDIF ; ENDIF ; IF NoError ; MONITOR ; l = %len(%trim(strpco)) ; ExecCmd( strpco: l ) ; ON-ERROR ; IF msgid <> 'IWS4010' ; ErrorMsg = msgtxt ; DisplayMessage( ErrorMsg : errorttl ) ; NoError= *off ; ENDIF ; ENDMON ; ENDIF ; IF NoError ; string = %trim(ahurl) ; IF ahdoc <> *blanks ; string = %trim(string) + %trim(ahdoc) ; ENDIF ; MONITOR ; command = %trim(StrPccmd) + qt + %trim(string) + qt + apos + ' pause(*no)' ; l = %len(%trim(command)) ; ExecCmd( command: l ) ; ON-ERROR ; ErrorMsg = msgtxt ; DisplayMessage( ErrorMsg : Errorttl ) ; ENDMON ; ENDIF ; IF %open(SCHURLPF) ; CLOSE SCHURLPF ; ENDIF ; RETURN noError ; /end-free P ShowHelp E