PDF='MAIN' { ATTRIBUTES='*' { LIBLOBJ='*FILES'; USEACTGROUP='1'; PLATFORM='rpg400.txt'; OBJECTNAME='GETNEXINF'; OBJLIBRARY='XL_WEBDEMO'; TITLE='Get Nexus info.'; SOURCEFILE='QRPGLESRC'; SOURCELIBR='XL_WEBDEMO'; ROWCOLOR1='F0F0FF'; ROWCOLOR2='FFFFFF'; WEBPATH='http://esdi.excelsystems.com/wsdemo/'; SET='46'; VERSION='3.00'; CRTBNUM='Build 7367'; CRTTEMPLT='C:\\Program Files\\ESDI\\WebSmart\\Templates v4\\Simple page.tpl'; SAVBNUM='Build 9003'; LASTLOC='0'; LASTSAVE='8/25/2006 13:27:15'; ATTACHED='0'; PROJECT='36'; VHTML='N'; } PANELS='*' { PANEL='MainSeg' { DESC='Main Segment'; DETAILS=' Get Nexus info.

Get Nexus info.


Site#:
Name:
User ID:
Email:
'; } } PREVIEWS='*' { DEFAULT='MainSeg'; PREVIEW='MainSeg' { SEG='MainSeg'; } } ACTIONS='func Main() { // Program Name: GETNEXINF // Program Title: Get Nexus info. // Created by: Mike Richard // Template family: Plain Vanilla // Template name: Simple Page // Purpose: Example to show how to get the nexus session infomation from // a websmart program. // Determine which library list will be used setlibl("*FILES"); // Open all files openfile("*ALL"); // As a default task for this program, execute the generic function runtask("DEFAULT", generic); crtfld(tempsid, 64, "A", 0, "Temp Smurf ID"); crtextstruct(sessds, SMSESSF, "Session info"); // Skip the auto smurf check just incase this program doesn\'t use smurfs. skipsmurfchk(); // gensmurfid("*IFNONE", "*WAS",1, "*NO", "*NO"); crtklist(SMUSRF.defaultlink, sitenumwf, useridwf); crtfld(useridwf, 32, "A", 0, "userid workfield"); crtfld(sitenumwf, 5, "N", 0, "numeric site number work field"); crtfld(emailwf, 96, "A", 0, "email work field"); } func generic() { // If your program is using a smurf, uncomment the following // if statement to save your current smurf in a temp work field. // if (pgmf_smurfid <> "") // { // tempsid = pgmf_smurfid; // } // get the nexus smurf ID from the NexusAccess Cookie. pgmf_smurfid = getcookie("nexusaccess"); // get the session info sessds = getsmurf("sessds"); sitenumwf = alphatonum(SSALSI); useridwf = SSUSID; getrcd(SMUSRF, "*DFTKEY", "*YES"); emailwf = USEMAL; // write out the Nexus session details to the screen wrtseg(MainSeg); // If your program had it\'s own smurf, uncomment the following // if statement to retrieve this programs smurf // if (tempsid <> "") // { // pgmf_smurfid = tempsid; // } } '; FILES='*' { FILE='SMSESSF' { LIBRARY='XL_SMSLIB'; MEMBER='*FIRST'; RCDFORMAT='RSESSF '; LEVELID='1060421163044'; EXTDS='1'; RFLEVELID=''; } FILE='SMUSRF' { LIBRARY='XL_SMSLIB'; MEMBER='*FIRST'; RCDFORMAT='RUSRF '; LEVELID='1060421150107'; EXTDS='0'; RFLEVELID=''; } } }