';
}
}
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='';
}
}
}