ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

retrieve pf called by CL or CLLE program

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

  • retrieve pf called by CL or CLLE program

    hi guys,

    how to retrieve physical file called by CL or CLLE program?
    what command should i use?

    thanks!
    tina

  • #2
    Re: retrieve pf called by CL or CLLE program

    Tina,

    I am presuming that you wish to read a PF in an CL?

    If so, something like the following

    (Declare file to the program)

    DCLF FILE(MYFILE)

    (Define a tag to loop back to)

    READ:

    RCVF RCDFMT(MYREC)

    (monitor for eof)

    MONMSG MSGID(CPF0864) EXEC(DO)
    GOTO ENDPGM
    ENDDO

    (do some processing here of record read, all fields referenced prefixed by & in the CL)

    (back to read next record)
    GOTO READ

    Hope that helps...

    Code:
                 PGM                                                    
                                                                        
                 DCLF       FILE(QTEMP/DISK_USED)                       
     LOOP:       RCVF                                                   
                 MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(EXIT))      
                                                                        
             /* do your processing */                                   
                                                                        
                 GOTO       CMDLBL(LOOP)                                
                                                                        
     EXIT:       ENDPGM

    Comment


    • #3
      Re: retrieve pf called by CL or CLLE program

      Hi,
      Thanks for the help.
      But I need to view physical file used in cl or clle program. What command should I use?

      Like, to retrive CL source we have this RTVCLSRC.
      vice versa... i want to retrieve physical file used in CL program.

      Thank you so much.. !!!

      Regards,
      Christina

      Comment


      • #4
        Re: retrieve pf called by CL or CLLE program

        Use DSPPGMREF command.
        Thanks,
        Giri

        Comment


        • #5
          Re: retrieve pf called by CL or CLLE program

          If you are trying to retrieve the source for a physical with a command...You cant

          you will need to use the API used in this example and write your own.


          or if you have DBU they have a free tool.


          Take care
          Jamie
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: retrieve pf called by CL or CLLE program

            Thank you guys..

            especially you jamie.. thanks for the help.. i really appreciate it..

            regards,
            christina

            Comment


            • #7
              Re: retrieve pf called by CL or CLLE program

              Your very welcome...........

              Take care post us a nice landscape picture (beach) from the Philippines. I happen to be in the Midwest (Illinois) and am buried in snow


              Take care
              Jamie
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: retrieve pf called by CL or CLLE program

                Hi Jamie,

                Thank you.... that is true we have a nice beaches here in Phils. You should come by some time.. If you want I could send you some picture of the beaches that I've been visited.

                Here, some people would love to have a snow in the Phils.. but it will not happen... we have a tropical climate here...

                Thanks again and Take care.

                Cheers!
                Christina

                Comment


                • #9
                  Re: retrieve pf called by CL or CLLE program

                  sure please send pictures.....

                  I would love to see some sunshine....If you want I can send you some snow

                  Take care
                  Jamie
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment


                  • #10
                    Re: retrieve pf called by CL or CLLE program

                    yeah.. i will definitely send you pictures when i get home.. im still in the office no pictures in my pc right now.

                    please send some snow pictures of yours.. thank you...

                    do you mind me adding your AOL and YM account?

                    take care,
                    christina

                    Comment

                    Working...
                    X