ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Identify which Program wrote IFS file

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

  • Identify which Program wrote IFS file

    Hi all, I am facing an issue where an IFS file is being written during a complex process but not able to see which program creates/writes to this IFS. Is there a way to use RPG/ SQL /Shell to see which program does it?

    Appreciate your help.

  • #2
    Turn on auditing for the file? (CHGAUD).

    Cheers,

    Emmanuel

    Comment


    • #3
      Hello everybody, Someone know how to update a IFS FILE using this instruction but to change just a couple of lines not the whole file.

      CALL QSYS2.IFS_WRITE('/home/MyFolder/test.txt',
      'Replace line',
      OVERWRITE => 'REPLACE',
      END_OF_LINE => 'CRLF')​

      Best Regards,

      Comment


      • #4
        Not sure what exactly you are looking for, but an IFS file is just a big string (which can include some line breaks).
        For modifying something, you may just access the IFS file with GET_CLOB_FROM_FILE or GET_DBCLOB_FROM_FILE or GET_BLOB_FROM_FILE (note you have to run it under commitment control).
        Once you accessed the IFS file, you just can use SQL Scalar functions, such a REPLACE to modify your data.

        Comment

        Working...
        X