Skip to content

Conversation

chrjorgensen
Copy link
Collaborator

Changes

This PR will make C4i check the joblog after an action command has run for information about EVFEVENT file.
The joblog is checked for messages starting with EVFEVENT:, and if found, will extract the library and object from the message text.

This allows the server to tell C4i where the object was created and thus where the EVFEVENT file is located.

This change comes from a discussion in issue #2910 about building using a build tool on the IBM i, where the build tool may determine the target library. The change allows for better locating the EVFEVENT files generated and thus better diagnostics handling.

How to test this PR

Test setup:

  1. create a CL source testcl.clle containing a deliberate error, e.g. dcl &var *charX 1
  2. create an action TEST1 with the following command:
    CRTBNDCL QRPLOBJ/&NAME SRCSTMF('&FULLPATH') OPTION(*EVENTF) DBGVIEW(*SOURCE)
    (This action will prohibit C4i from extracting the library and object since PGM() is missing, simulating a user build command.)
  3. duplicate the action TEST1 into TEST2 and insert the following command before the line containing CRTBNDCL...:
    runsql 'call SYSTOOLS.LPRINTF( ''EVFEVENT: QRPLOBJ ,testcl'' )' commit(*none)
    (This action will add a message to the joblog, indicating the location of the EVFEVENT file.)
  4. change the current library to QGPL

Test on branch master:

  1. remove any previous TESTCL member from QGPL/EVFEVENT file: rmvm qgpl/evfevent testcl
  2. run action TEST1 on source testcl.clle. The action will fail and no diagnostics are shown. This error will appear:
    image
  3. remove any previous TESTCL member from QGPL/EVFEVENT file: rmvm qgpl/evfevent testcl
  4. run action TEST2 on source testcl.clle. Same result as in step 2.

Test on this branch/PR:

  1. remove any previous TESTCL member from QGPL/EVFEVENT file: rmvm qgpl/evfevent testcl
  2. run action TEST1 on source testcl.clle. The action will still fail and diagnostics are still not shown.
  3. remove any previous TESTCL member from QGPL/EVFEVENT file: rmvm qgpl/evfevent testcl
  4. run action TEST2 on source testcl.clle. The action will still fail, but diagnostics are now shown!

Checklist

  • have tested my change
  • have created one or more test cases
  • updated relevant documentation
  • Remove any/all console.logs I added
  • have added myself to the contributors' list in CONTRIBUTING.md

@chrjorgensen chrjorgensen requested a review from a team October 15, 2025 08:51
@chrjorgensen chrjorgensen added the enhancement New feature or request label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant