ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Please help.! I want to list my records on monitor

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

  • Please help.! I want to list my records on monitor

    hi,
    I need to list my records for example;

    Name surname
    john smith
    ian clerance
    james hetfield

    I want to list them on screen
    but I dont want to use subfiles. Do I have any alternative solution about that. Thanks for all help

  • #2
    Re: Please help.! I want to list my records on monitor

    ummm...what's wrong with using a subfile? this is exactly what they were created for...
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Please help.! I want to list my records on monitor

      There is an SLNO for Display files. You turn it on and use a variable to tell it what line to start at for the output.

      But, I'm with Tom here... why not use Subfiles?

      Comment


      • #4
        Re: Please help.! I want to list my records on monitor

        we are a group team in our business. My friend made his program with subfiles. I want to try different solution for learning different things. Thats why I dont wanna use subfiles. You said SLNO files. DO you have any examples about it. How can I use SLNO in COBOL/400. THanks for all your help again.

        Comment


        • #5
          Re: Please help.! I want to list my records on monitor

          The display file manual may be found on the IBM web site at http://publib.boulder.ibm.com/infoce...zakc/rzakc.pdf.

          Do a search on SLNO. That particular value is discussed on page 236 of the manual. I cannot provide you any sample code as I have never used it myself.

          Steve

          Comment


          • #6
            Re: Please help.! I want to list my records on monitor

            Umm i dont think the SLNO field will work for him considering its only used to positioning fields relative to a particular line number as indicated by the SLNO field. However, what is required here is to list a set of records which is what subfiles are used for.

            Two other alternatives are:-
            1.) Use DDM techniques (hope i didnt go wrong here since i am yet to try this one out) to dynamically create and list the fields using your program. However am not sure how to use this in Cobol but i guess it should be possible since we can use APIs.
            2.) Declare 40 fields and try to make it look like a listing (I wouldnt really call this an alternative)

            Comment


            • #7
              Re: Please help.! I want to list my records on monitor

              Actually I think that before to create fields dynamically. But I think I have to define fields in DDS before use it. So I cant create dynamically that I think. But it can be wrong. Can you tell me or anyone tell me how to create fields dynamically or you have any dds and cobol example codes about it.

              Comment


              • #8
                Re: Please help.! I want to list my records on monitor

                to dynamically create screens you'll have to use DSM APIs...and they aren't for the faint of heart...
                http://publib.boulder.ibm.com/infoce...c/apis/dsm.htm
                I'm not anti-social, I just don't like people -Tommy Holden

                Comment

                Working...
                X