Multiple rows of comments

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Chesca
Veteran Member
Posts: 490
Veteran Member
    Hello, I am trying to write custom code to update a table. My users wants to enter comments up to 150 characters long, but I can only fit up to 75 characters. So I added multiple rows of comments to give me that many characters. However, I am not sure how to code it in my program to concatenate both rows and display on the screen or move it to the database. is there a Lawson program I can use as example to do this? Thank you in advance for your help!

    I have attached the screen.

    jaherb
    Veteran Member
    Posts: 164
    Veteran Member
      When I've done this in the past, I've treated the two comment lines as two separate fields and stored them as such. While reading your note however, you could place a special character in position 76 and use the string and unstring command to break apart. Another option would be to actually count the number of positions used in each comment line and break them apart that way once you get close to the end.

      HR90 uses an array of 11 lines in the .scr to store comments.

      Chesca
      Veteran Member
      Posts: 490
      Veteran Member
        Jaherb, your help is greatly appreciated! I counted the number of positions used in each comment line and broke them apart as suggested and it worked.

        MOVE NYSRF1-NYS-COMMENTS(1:75) TO NYS-COMMENTS (1:75).
        MOVE NYSRF1-NYS-COMMENTS-LINE2 TO NYS-COMMENTS(76:75).