Focal Point
adding trailing spaces

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6221049961

May 30, 2006, 01:41 PM
pricebl
adding trailing spaces
Hope someone out there can help!
I have a userid field that is 8 characters. The actual userid is not always 8 characters but I need it to be. How do I add trailing spaces to the end of the actual userid?
Thanks for any help!
May 30, 2006, 01:58 PM
susannah
assuming your userid is an & variable,
-SET &MYID = 'RICKY';
-SET &MYID2= 'LUCY' | '    ';
-TYPE &MYID.LENGTH &MYID2.LENGTH
-RUN
-EXIT

will give you 05 and 08 respectively for lengths




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 30, 2006, 02:01 PM
Mikel
-* 8 characters user retrieval.
-SET &USR = GETUSER('A8') ;
-TYPE User..: &USR
-TYPE Length: &USR.LENGTH

-* Add more trailing spaces. (for example: 10 characters)
-SET &USR = EDIT(&USR | '          ', '9999999999') ;
-TYPE User..: &USR
-TYPE Length: &USR.LENGTH

Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
June 01, 2006, 03:10 PM
pricebl
Thanks to both of you - I used your suggestions and got it to work!