ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to make DSPF with dynamically positionned/lengthed subfile input fields?

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

  • How to make DSPF with dynamically positionned/lengthed subfile input fields?

    I need to make a DSPF with different lengthed input fields that are dynamically positionned, as in can change position in the subfile depending on user input/function keys. Something similar to the IBM command DSPJRN. The input fields are of varying lengths and if you press F11, they change positions. And if you put + in certain fields (like for FILE), it duplicates the number of lines. What is the easiest way to achieve this?

    I've tried using a subfile with a long string field and using the appropriate hex values to make part of the string input capable (x'24') but then the position of this hex code is also modifiable (as well as the ending hex code x'A0'), which I don't want.

    At first, I thought that maybe it was just several non-subfile formats, one for each screen. But with the + option, I really don't see how it can be anything other than a subfile. If so, how does IBM dynamically position the input field and the length of these fields for each line of the subfile?

  • #2
    There's no way to do this with a subfile. A subfile repeats the same fields for every row, and you're asking to have different fields for every row.

    You could do it by manually creating the screen with the dynamic screen manager, though. I suspect this is not the easy solution you were hoping for, but it's possible.

    Comment


    • #3
      So I take it the IBM commands are made using this dynamic screen manager? Ok, I'll try to see how I can do without this. Thanks for the reply.

      Comment


      • #4
        Without knowing what you are doing, it's hard to advise however since you have mentioned commands, IBM supply a language and compiler to create commands (CRTCMD). Is that what you are looking for?

        Comment


        • #5
          Sorry for the confusion, my initial question was how to make a program similar to the programs behind IBM commands like DSPJRN where the input fields are of varying lengths and can change position on each line depending on function keys or user input. Since you said that this is only achieved using Dynamic Screen Manager, I was simply wondering if that meant IBM used that to make the programs behind their commands.

          When I ask how IBM created their commands, I don't mean how a command is created, but how the program behind the command is coded, how the DSPF is coded. In my example (DSPJRN), when I press F11, is it a different DSPF format from the previous one? When I put + in certain fields and the screen refreshes with as many lines as I want, am I in a subfile? I'm guessing the answers to that are in Dynamic Screen Manager.

          Anyway, thanks again for the reply.

          Comment


          • #6
            I don't know how IBM writes their programs, they don't send me their source code. I just know that the dynamic screen manager is a way that would work. But, IBM may be doing much more complicated things like manually coding the 5250 protocol, or using some internal IBM tool that we don't have access to... or, maybe they are using DSM. I really don't know. (Not sure why it matters.)

            Comment


            • #7
              I'm just curious because it could potentially lead to another path to explore if it's not the case. Since I am trying to make a program similar to theirs, if they are not using Dynamic Screen Manager, it'd be good to know how they are coding their programs so I can potentially use these other tools or methods. If they ARE using DSM, then I'd know that's all I'd have to learn to use. If they aren't, perhaps the tools they are using are "easier" to learn than DSM.

              Either way, I don't expect an answer here and have dropped the idea of making a program with DSPF similar to IBMs.

              Comment


              • #8
                What about having different subfile formats?

                Comment


                • #9
                  Originally posted by Barbara Morris View Post
                  What about having different subfile formats?
                  I believe the OP wanted input fields on each line of the same screen to be different lengths, and these lengths need to be determined dynamically. I can't see how different subfile formats would accomplish that?

                  Comment


                  • #10
                    Originally posted by Scott Klement View Post

                    I believe the OP wanted input fields on each line of the same screen to be different lengths, and these lengths need to be determined dynamically. I can't see how different subfile formats would accomplish that?
                    Yep, you're right. I suspected I was missing something ...

                    Comment

                    Working...
                    X