ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Autogenerated ID field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Autogenerated ID field

    Is it possible to have a field on my display file called Emp ID which is autogenerated and protected?
    Protected i can go about doing it from the "Select Display attribute" options and assigning an indicator.But how can i have that field as autogenerated.Please guide.

  • #2
    Re: Autogenerated ID field

    generate the number in your program, slug the number into the protected field prior to your exfmt for display only.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Autogenerated ID field

      sure you can do it many ways...
      rpg way: data area or control table and retrieve current value +1 --or--
      sql Way: http://www.code400.com/forum/showthr...ailable-number
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: Autogenerated ID field

        Can u pl guide how can a data area be used for the same.I have never really been comfy wid data areas.Appreciate any guidance on dis.

        Comment


        • #5
          Re: Autogenerated ID field

          download code from here:http://www.code400.com/inside.php?category=TIP

          look for example named: Working with a data area

          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment

          Working...
          X