codefori / vscode-ibmi

🌍 IBM i development extension for VS Code
https://codefori.github.io/docs/#/
MIT License
284 stars 92 forks source link

Mapepire component backend #2256

Open worksofliam opened 1 month ago

worksofliam commented 1 month ago
worksofliam commented 1 month ago

Bad news about qcmdexc. It works fine if the command executes successfully:

call liama.sql_system('CRTBNDRPG PGM(*CURLIB/OCEAN) SRCFILE(LIAMA/QRPGLESRC) OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTRLS(*CURRENT)', 'SAMPLE');

But, if the command you execute has a return code of more than 0, no spool is written and therefore we can't capture it with SQL like we can with the system command:

call qsys2.qcmdexc('CRTBNDRPG PGM(*CURLIB/OCAN) SRCFILE(LIAMA/QRPGLESRC) OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTRLS(*CURRENT)');

 select char(job_number) || '/' || job_user || '/' || job_name, spooled_file_name, spooled_file_number 
  from table(qsys2.spooled_file_info()) x order by creation_timestamp desc limit 20;

Maybe we still leave the compiles and library list stuff to QSH?