From 6fad7eed28ef4ceb5ab87cea3f2a74c89602fd5f Mon Sep 17 00:00:00 2001 From: Seb Julliand Date: Tue, 27 Feb 2024 12:03:17 +0100 Subject: [PATCH] Run DSPOBJD for each library in library list Signed-off-by: Seb Julliand --- src/api/IBMiContent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/IBMiContent.ts b/src/api/IBMiContent.ts index 9ab60aa2d..7bf92ffeb 100644 --- a/src/api/IBMiContent.ts +++ b/src/api/IBMiContent.ts @@ -398,7 +398,7 @@ export default class IBMiContent { `; results = await this.runSQL(statement); } else { - results = await this.getQTempTable([`CALL QSYS2.QCMDEXC('DSPOBJD OBJ(QSYS/*ALL) OBJTYPE(*LIB) DETAIL(*TEXTATR) OUTPUT(*OUTFILE) OUTFILE(QTEMP/LIBLIST)')`], "LIBLIST"); + results = await this.getQTempTable(libraries.map(library => `@DSPOBJD OBJ(QSYS/${library}) OBJTYPE(*LIB) DETAIL(*TEXTATR) OUTPUT(*OUTFILE) OUTFILE(QTEMP/LIBLIST) OUTMBR(*FIRST *ADD)`), "LIBLIST"); if (results.length === 1 && !results[0].ODOBNM?.toString().trim()) { return []; } @@ -506,7 +506,7 @@ export default class IBMiContent { let createOBJLIST; if (sourceFilesOnly) { //DSPFD only - createOBJLIST =`select PHFILE as NAME, ` + + createOBJLIST = `select PHFILE as NAME, ` + `'*FILE' as TYPE, ` + `PHFILA as ATTRIBUTE, ` + `PHTXT as TEXT, ` +