Format Issues

 1 Replies
 0 Subscribed to this topic
 18 Subscribed to this forum
Sort:
Author
Messages
Shasidhar Vemireddy
Basic Member
Posts: 14
Basic Member
I have a column that needs to be populated it is CHAR(17), i need to populate this fied with the EMPLOYEE number which is numeric (size 9). so when i try to move the value directly into the CHAR field the end result is something like this

"000002456 "..however i want soemthing like this
"2465 ".I tried various formatting options including lawson API's with no good result.Does anyone have a suggestion ?
John Henley
Posts: 3364
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
You can do it yourself with COBOL code; it's a two-step process. First move the employee number to a numeric-edited field [i.e. PIC Z(9)]. Then use a loop to move character-by-character thru an alphanumeric field that redefines the edited field.

You can also look at the 5000-HREMP-FORMAT-FIELD API from HREMPFMT.

Thanks for using the LawsonGuru.com forums!
John