Format Issues

Sort:
You are not authorized to post a reply.
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
    Senior Member
    Posts: 3348
    Senior Member
      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
      You are not authorized to post a reply.