ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Modifying an existing subfile screen

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

  • Modifying an existing subfile screen

    Hi, Simple question - but I've never done it.

    We have an existing subfile screen we use to receive items. 5 fields per record, all I/O. Multi-page (SFLPAG 15, SFLSIZ 16)

    Code:
       10   SPO#          Y   B      5,0   07 027
       20   SITEM         A   B        6   07 012
       30   SPC#          Y   B     10,0   07 041
       40   SQTYD         Y   B      5,1   07 060
       50   SWH           Y   B      2,0   07 071
    What a user asked for is simply to be able to include a count on the left, so that the screen would look like

    1. SITEM SPO# SPC# SQTYD SWH
    2. etc.
    3. etc.

    and so on.

    I feel like an idiot for even asking, but how do I do that?
    Thanks.
    "It's what you learn after you know it all that counts." - John Wooden

  • #2
    Re: Modifying an existing subfile screen

    Is the number the value for the entire subfile or just the page? Can you display the RRN of the subfile on each line?

    Comment


    • #3
      Re: Modifying an existing subfile screen

      The request was just for on the page. That way when they're receiving items, they'll know how many they put in without going back to the bill of lading and counting off which one.
      Does that make sense?
      "It's what you learn after you know it all that counts." - John Wooden

      Comment


      • #4
        Re: Modifying an existing subfile screen

        I would add a numeric field to the subfile record, and in the RPG just before I WRITE the subfile record I would popuate it with the RRN.
        But I'm not sure I fully understand how you use this screen, so I'm not sure if it would serve your purpose or not.

        Comment


        • #5
          Re: Modifying an existing subfile screen

          Hi Larry:
          I'm not sure I understand the requirement.
          Are you looking for a running count of records added?
          If so.....the count does not belong in the subfile...it should go in the control record or footer record.
          You can write a quick cl to retrieve the record count and populate the screen field.
          Call that cl before you exfmt on the subfile.

          (not tested)
          Code:
          pgm parm(&lecount)
          
               dcl &lecount  type(*dec) len(10 0)
          
               Rtvmbrd  file(myfile) mbr(mymbr) nbrcurrcd(&lecount)
          
          endpgm
          on the other hand I may not really understand what you are asking for

          Best of Luck
          GLS
          The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

          Comment

          Working...
          X