PGM
DCL VAR(&SEARCHVAL) TYPE(*CHAR) LEN(100) +
VALUE('123456') /* Sample KEYWORD 1 value +
of 123456 */
DCL VAR(&NEWSESSION) TYPE(*CHAR) LEN(255)
DCL VAR(&MAINURL) TYPE(*CHAR) LEN(200)
DCL VAR(&URL) TYPE(*CHAR) LEN(255)
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERRORS))
/***********************************************************/
/* Retrieve MAIN Image Server/400 URL Setting. */
/* Example: http://192.168.1.1 */
/***********************************************************/
RTVDTAARA DTAARA(MAINURL) RTNVAR(&MAINURL)
/***********************************************************/
/* Create Image Server Web Session ID. This logs the green */
/* screen user into the Image Server/400 software. */
/* */
/* *AS400USER can be used for the WEBUSER parm if desired */
/* and you have set up Image Server user IDs which match */
/* the corresponding AS/400 user id. */
/* */
/* *NOPASSWORD can be used for WEBPASS is you want to */
/* ignore Image Server passwords when launching a new */
/* web session from a green screen. */
/***********************************************************/
DOCSESRTV WEBUSER(TEST) WEBPASS(*NOPASSWORD) +
RTNSESSION(&NEWSESSION)
/***********************************************************/
/* Build URL to Launch Image Server/400 document search. */
/* This example searches using KEYWORD1 */
/* Search Keyword values: */
/* SRCHFLD01 - SRCHFLD10 - Keyword Fields to search */
/* Multiple keywords can be used. */
/* SRCHTITLE - Search the document title */
/* SRCHDOCTYP- Search the specified document type */
/* BEGDAT - Set the beginning doc date 'MM/DD/YYYY' */
/* ENDDAT - Set the beginning doc date 'MM/DD/YYYY' */
/***********************************************************/
CHGVAR VAR(&URL) VALUE(&MAINURL |< +
'/IMAGESERVER/DOC100R?ACTION=Search&ISESSIO +
N=' |< &NEWSESSION |< '&SRCHFLD01=' |< +
&SEARCHVAL)
/***********************************************************/
/* Use the iSeries Integrator to launch the web browser */
/* search for Image Server/400. */
/***********************************************************/
RJSOFFICE/OFCRUNPC RMTSYS(*CURRENT) CMD(&URL) +
OPTION(*WEBSITE)
RETURN /* Normal exit */
/***********************************************************/
/* Handle errors */
/***********************************************************/
ERRORS: SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Errors +
occurred while launching Image Server +
search URL')
ENDPGM
Last Modified On:
No, open a new Support Case