Back to SPR List Previous Next
SERADMIS(1,1,"") wraps the {name}; SERADMIS(1,0,"") doesn't wrap but pads the name with ascii 0:
Minor Closed - Fixed Found:XS.01.06 26 MAR 2007 Fixed:XS.01.07 12 SEP 2007

DETAILS
 The example program needs the server name changing to your server and will show the
 client name from seradmis(1.9,"") has trailing ascii 0's
EXAMPLE PROGRAM
 program
 string*40 name
 integer rc
 compute rc = serlog('larry:4000','')
 write "rc = " rc
 ifthen (rc gt 0)
 compute name = trim(seradmis(1,0,""))
 write ['"'+name+'"']
 for i = 1,len(name)
 write [sbst(name,i,1)] [ichar(sbst(name,i,1))]
 end for
 write ['"'+seradmis(1,1,"")+'"']
 compute rc = serlog('','')
 endif
 end program
WORKAROUND
Manually remove trailing ascii zeros, then use the stdname function: if (srst(name,char(0)) ne 0) compute name = sbst(name,1,abs(srst(name,char(0)))-1) write ['"'+stdname(name)+'"']
Back to SPR List Previous Next