ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Copy source

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

  • Copy source

    Hi All,

    I have to copy source of an CL program into a physical file(flat file).
    Which command helps me out for this??

    Thks,
    Susan.

  • #2
    Re: Copy source

    The source file QCL..SRC is already a physical file. What do you want to do exactly ?
    Philippe

    Comment


    • #3
      Re: Copy source

      My task is, to capture all the User commands used in particular CL program.

      So iam writing the CL program into a flat file and then reading tat file to check for commands.

      Thks,
      Susan.

      Comment


      • #4
        Re: Copy source

        CPYF works, so does CPYSRCF...but you shouldn't have to use either, just override the source file to the CL source member and read it...
        I'm not anti-social, I just don't like people -Tommy Holden

        Comment


        • #5
          Re: Copy source

          If you don't already know the fields on the source file record, use a DSPFFD
          John McKay
          jmckay@mckaysoftware.ie
          http://www.rpglanguage.com

          Comment


          • #6
            Re: Copy source

            Perhaps use the FNDSTRPDM command to search for the string? Pete

            Comment


            • #7
              Re: Copy source

              If you prefer (or need) to read CL source in a RPG program, just use this override and reference file name QCLSRC (or whatever the source file name is) - and the name of the member you need.
              Code:
              OVRDBF FILE(QCLSRC) MBR(SIB170C)

              Comment


              • #8
                Re: Copy source

                Hey pete good to read you! as well as everyone else...its just we both live in the land of lincoln....

                There are old very old (someone needs to update this site ) example of
                reading an entire source file and doin stuff to each member.
                you could use this as a starter example...



                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

                Working...
                X