Skip to content

Conversation

@worksofliam
Copy link
Member

@worksofliam worksofliam commented Oct 26, 2025

Changes

Rips out the legacy SQL runner with Mapepire, which is bundled in the VSIX and installed as a component.

ILE command improvements

runCommand has a lot of new logic. We now we should do all compiles with SQL. This means no more system, no more standard in or standard out from system. Due to that, we no longer have access to the job log or spool file generated by the executed command.

runCommand has four steps now:

  1. Set the library list (using qcmdexc - if required)
  2. Execute the command (using qcmdexc)
  3. Fetch the latest job log entries job log (using qsys2.joblog_info('*'))
    • I am not sure if this logic is sound proof, since we are depending on ORDINAL_POSITION and I believe there are some instances where it is not updated correctly from prior commands. The only way to get around that is to always fetch the job log even if it's not needed (skipDetail)
  4. Fetch the spool file (using a complicated statement)

Due to this implementation, runCommand cannot really run asynchronously like system allowed. At the runCommand level, I have had to implement a queue system so that these sequence of events can only happen one at a time. This ensures the right job log and spool file is returned for the correct command.

To do

  • Update build to run npm run dsc as part of VSIX build
  • Ensure all test cases are passing under Mapepire
  • Test different CCSID scenarios
  • Remove/replace all liblist usage
  • Ensure that the component is valid with the existing install from the database extension

How to test this PR

  • Ensure the test cases pass

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

Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
@worksofliam worksofliam changed the title Feature/mapepire_internals Mapepire as SQL runner Oct 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2025

👋 A new build is available for this PR based on 7ac9eb2.

Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants