ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Data area

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

  • Data area

    How do we read data area in cobol pgm ?

  • #2
    Re: Data area

    You can use the QWCRDTAA API to retrieve a data area.

    Or you can create a CL program that executes the RTVDTAARA command and returns the value to the COBOL program.
    Help you out? Sure. Which way did you come in?

    Comment


    • #3
      Re: Data area

      OPM Cobol or ILE/Cobol? For ILE/Cobol use the ACCEPT statement outlined in the manual:

      Comment


      • #4
        Re: Data area

        Hi Bingo,

        In COBOL, it is feasible to read DATA AREA using API QCMDEXC.

        Refer the code below:

        CALL "QCMDEXC" USING READTAARA-CMD,
        READTAARA-LEN

        In parameter READTAARA-CMD, move the CL command to read the data area
        EG: RTVDTAARA DTAARA(*LDA (1 10)) RTNVAR(&DFTLIB)
        and parameter READTAARA-LEN contains the length of the command

        Comment


        • #5
          Re: Data area

          i'm not a COBOL guy...but i can say that RTVDTAARA via QCMDEXC simply will not work. the QCMDEXC API will not be able to process ANY RTV* command. RTV* commands return values in which the QCMDEXC API has no way to capture.
          I'm not anti-social, I just don't like people -Tommy Holden

          Comment


          • #6
            Re: Data area

            Hope Bingo solved this since Sept 2010 !
            Philippe

            Comment


            • #7
              Re: Data area

              Originally posted by Mercury View Post
              Hope Bingo solved this since Sept 2010 !
              BAH!!! i didn't notice that tejas.beri dredged this thread from last year up...(not only to reply but to give a "fix" that wouldn't work!) oh well...maybe my post will be seen by others that think QCMDEXC will work using RTV* commands
              I'm not anti-social, I just don't like people -Tommy Holden

              Comment

              Working...
              X