random alphanumeric string

 3 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Srini Rao
Veteran Member
Posts: 149
Veteran Member
    We have a request to generate a random alphanumeric string of characters using 4GL.  Any ideas if there are any random character generating functions available in COBOL?
    jaherb
    Veteran Member
    Posts: 164
    Veteran Member
      Srini.... I have never encountered any functionality that provides that withing 4GL.
      Srini Rao
      Veteran Member
      Posts: 149
      Veteran Member
        Thanks. I'm not sure I can do it or not. I have thinking to use Java script API to generate random number and pass back to 4GL to populate the screen.


        Scott Perrier
        Veteran Member
        Posts: 39
        Veteran Member
          Microfocus has a random number function, i am not user if lawson compiler allows it. might have to compile it outside of lawson if that is the case.

          here is a forum link that shows it all:
          http://computer-programmi...b2662f3adfbb909d.htm

          to convert the number to alpha- set the range to 1- 26 or 1-52 for both cases and then define 2 working storage varables in the same order with a redefine and 88 levels for the various values like you would for changing upper to lower case.