I'm going to try and simplify/generalize names, but if this isn't what you're asking for, let me know.
Part 1: No changes here- Library LIVELIB - MENU calls OCL Procedure
- OCL Procedure's last line calls my CL wrapper program EVALWRAP
Part 2a: Wrapper Original Code - to use SPEVALOG which still resided in MYSNDBOX, same as the pgm.
Code:
PGM
ADDLIBLE LIB(MYSNDBOX) POSITION(*BEFORE SECNDLIB)
SNDPGMMSG MSG('Job started.')
OVRDBF FILE(ACCTMAST) TOFILE(QS36F/ACCTMAST)
OVRDBF FILE(ORDMAST) TOFILE(QS36F/ORDMAST)
CALL PGM(MYSNDBOX/EVALPGM)
SNDPGMMSG MSG('Job ended.')
DLTOVR FILE(ACCTMAST)
DLTOVR FILE(ORDMAST)
RMVLIBLE LIB(MYSNDBOX)
ENDPGM
Part 2b: Wrapper Code - to use SPEVALOG where it will reside when everything is Live.
Code:
PGM
ADDLIBLE LIB(MYSNDBOX) POSITION(*BEFORE SECNDLIB)
SNDPGMMSG MSG('Job started.')
OVRDBF FILE(ACCTMAST) TOFILE(QS36F/ACCTMAST)
OVRDBF FILE(ORDMAST) TOFILE(QS36F/ORDMAST)
OVRDBF FILE(SPEVALOG) TOFILE(QS36F/SPEVALOG)
CALL PGM(MYSNDBOX/EVALPGM)
SNDPGMMSG MSG('Job ended.')
DLTOVR FILE(ACCTMAST)
DLTOVR FILE(ORDMAST)
DLTOVR FILE(SPEVALOG)
RMVLIBLE LIB(MYSNDBOX)
ENDPGM
Part 3: Within MYSNDBOX/EVALPGM - which is SQLRPGLE
The query did not change. The file was not defined in F specs because it is only used within the SQL statement.
Code:
C/exec sql
C+ SET OPTION COMMIT = *NONE
C/end-exec
....
C/EXEC SQL
C+ INSERT INTO SPEVALOG (RUNDATE,
C+ Z2_non, Z2_DASreg, Z2_DASext, Z3_non, Z3_DASreg, Z3_DASext,
C+ Z4_8DASreg, Z4_8DASext, cntOther,
C+ Tot_ForceG, Tot_Preset, Tot_Changed, Tot_Read, Tot_Skipped, Tot_PLReg,
C+ Tot_UPSEval, Tot_UPSAlt, Tot_PPEval, Tot_PPAlt, Tot_MaxOut)
C+ VALUES (CURDATE(),
C+ :z2_Reg, :z2_DASr, :z2_DASx, :z3_Reg, :z3_DASr, :z3_DASx,
C+ :z4_8_DASr, :z4_8_DASx, :rptCNTothr,
C+ :FORCEcnt, :SPSETcnt, :SPCHGcnt, :READcnt, :SKIPcnt, :PLREGcnt,
C+ :UPSEVLcnt, :UPSCHGcnt, :PPEVLcnt, :PPCHGcnt,:CSTLIMcnt)
C/END-EXEC
I had not touched Object Authority until I found this issue.
When the program was updating SPEVALOG within the same library as the program, the end user's process always updated the file. It stopped working after trying to work with the file within QS36F instead. I made the Object Authority's identical on Thursday for SPEVALOG within both libraries, giving the specific users *ALL rights and giving *PUBLIC specific rights, instead of *EXCLUDE. However, the users' job logs are still showing the original error messages.
Code:
Object ---------------Data---------------
User Group Authority Read Add Update Delete Execute
*PUBLIC USER DEF X X X X
MYSELF *ALL X X X X X
USER1 *ALL X X X X X
USER2 *ALL X X X X X
USER3 *ALL X X X X X
USER4 *ALL X X X X X
It looks like I did create the file in QS36F by using CREATE TABLE scripts through the SQuirreL tool. I'm still trying to compare the files from either the iSeries or the SQuirrel tool to find any differences.
Does any of this this help at all??
Thank you!
Elizabeth