ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

To print fields from/to.

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

  • To print fields from/to.

    Hi!

    Is it possible to have a print of PF and DSPF sources with just these data:
    - name
    - type
    - decimals
    - input from
    - input to
    - output from
    - output to

    It would be useful to have this printing when using OVERLAY.
    AFAIK it's now only in the compilers listing.

    TIA
    Arnaldo

  • #2
    Re: To print fields from/to.

    Originally posted by argasoft36
    - input from
    - input to
    - output from
    - output to
    What are those values? Are they buffer positions? A DSPF would generally require row and column values for both starting and ending positions, and those would be different from buffer positions. For PFs, input and output positions will essentially be the same values.

    What use would these values be? If we knew the reason for wanting these, better alternatives might be suggested.

    (BTW, the DSPFFD command provides all of those and more. Just create an *OUTFILE and query it.)
    Last edited by tomliotta; October 12, 2014, 05:00 AM. Reason: Mention DSPFFD.
    Tom

    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

    Comment


    • #3
      Re: To print fields from/to.

      Thanks Tom.

      I looked at the DSPFFD and it's a bit too much.
      I just mean something as per attachment which could be printed on less pages.
      Printing field definitions with SDA gives just NAME/LENGTH/TYPE/ROW/COLUMN and you have to print each screen.

      Anyway, it's just a Sunday question.

      Arnaldo
      Attached Files

      Comment


      • #4
        Re: To print fields from/to.

        That would be a simple query report over the DSPFFD *OUTFILE. A QM query with a QM form would be all that's needed. I ran DSPFFD and did a simple query and form over the *OUTFILE to get this output report:
        Code:
        file name    XAMPD                                               file type  DSPF
        record name  SFLREC
        
          field name    length  digits   decimals  type   I/O   in from     in to
          ----------  --------  ------  ---------  -----  ---  --------  --------
          *IN25             1       0          0   A      O          0         0
          *IN32             1       0          0   A      O          0         0
          FLD005            6       6          0   S      O          1         6
          FLD006            6       6          0   S      O          7        12
          FLD002            1       1          0   S      B         13        13
          BIGFLD        1,600       0          0   A      B         14     1,613
          *IN03             1       0          0   A      I          1         1
          *IN30             1       0          0   A      O          0         0
          *IN31             1       0          0   A      O          0         0
          RRN               3       3          0   S      B          2         4
          FLD001            8       0          0   A      I          5        12
                            0       0          0                     0         1-
        
        10/12/14 15:17:41                                                  Page 1
        With some effort, it could probably be made to match your example (including .PDF output) more closely. The example DSPF that I used for input is a little unusual, so the output probably seems unusual. But that's just a matter of how someone's files are defined and what is actually needed.

        I'm not clear what the problem is. It's just a query that uses a few fields from the *OUTFILE.
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment


        • #5
          Re: To print fields from/to.

          That's what I meant, excluding the *INs, and I thought there was some command of the many I still do not know doing this without querying (could be an idea for a tool).

          For the moment, I'll go on a bit awkwardly with some spreadsheets and try to become acquainted with Websphere 7.

          Thanks for your always prompt hints
          Arnaldo

          Comment


          • #6
            Re: To print fields from/to.

            I have a rough utility that builds a report from the outfile that DSPFFD builds. You can print the report or display it on the screen. If you want the source code, contact me thru the itjungle.com contacts page and I will email it to you.

            Comment


            • #7
              Re: To print fields from/to.

              Ted,

              Thank you. I'll contact you.
              I just have a free hosting account at RZKH and that means that I cannot upload anything except data files. In case I'll just type in.

              Arnaldo

              Comment


              • #8
                Re: To print fields from/to.

                Arnaldo, I have not had time to make my utility run under V5R4. Here is another utility that I think will run at V5R3.

                http://www.itjungle.com/mgo/mgo061902-story02.html

                Comment

                Working...
                X