Skip to content

Conversation

@Chi-Iroh
Copy link

Hi !

TARGETLIB='ZLIB' # Target OS/400 program library

In os400/make.sh, we can choose in which library the final service program is outputted, and the library is even created if it doesn't exist :

zlib/os400/make.sh

Lines 164 to 169 in 5a82f71

# Create the OS/400 library if it does not exist.
if action_needed "${LIBIFSNAME}"
then CMD="CRTLIB LIB(${TARGETLIB}) TEXT('ZLIB: Data compression API')"
system "${CMD}"
fi

We can see the service program being created there in ${TARGETLIB} :

zlib/os400/make.sh

Lines 329 to 337 in 5a82f71

if [ "${LINK}" ]
then CMD="CRTSRVPGM SRVPGM(${TARGETLIB}/${SRVPGM})"
CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(BNDSRC)"
CMD="${CMD} MODULE(${TARGETLIB}/OS400)"
CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR})"
CMD="${CMD} TEXT('ZLIB ${VERSION} dynamic library')"
CMD="${CMD} TGTRLS(${TGTRLS})"
system "${CMD}"
LINK=YES

But at the end, when adding the service program to the BNDDIR, it's passed as *LIBL/${SRVPGM} and not as ${TARGETLIB}/${SRVPGM}.

zlib/os400/make.sh

Lines 363 to 365 in 5a82f71

CMD="ADDBNDDIRE BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
CMD="${CMD} OBJ((*LIBL/${SRVPGM} *SRVPGM))"
system "${CMD}"

Seems like an issue to me, as the newly created library isn't added to *LIBL, so it seems wrong to search the service program in *LIBL.

@Chi-Iroh Chi-Iroh changed the title Fixed service program path, specified library instead of *LIBL [OS400] Fixed service program path, specified library instead of *LIBL Oct 20, 2025
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.

1 participant