Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
VNAV Compile warnings
Is there a routine available from anyone, or, how would I create one, that would compile all procs and report on any suspected vnav warning errors?
It would also need to compare the name of the actual sub/func with the saved record name to avoid compiling any 'saved' procs, unless of course that are compiled with the record name so it would be an 'override the liveone' issue.
TIA
It would also need to compare the name of the actual sub/func with the saved record name to avoid compiling any 'saved' procs, unless of course that are compiled with the record name so it would be an 'override the liveone' issue.
TIA
Comments
Errors =blint(ProgID,Code)
Not sure about the interpretation of the other params:
Thanks
result = Repository("TCOMPILE", entid, recompile_if_unchanged, cleanup_orphan_entities, preserve_linemarks)
The compile 'errors' are in ErrCode
case result<1> = 0
If Get_Status(ErrCode) then
Blint call looks like this:
Dont know how to create values for P6, which is the expanded inserts in the code.
Not sure if P3 is passed ot a result
BLint( mainname,ProcSource, "", "", "",ExpProcSource)
The source of the proc in mainname is retrieved by blint and my other inSource params are ignored
(Proved by entering different prog name in mainname than the source, with a forced vnav)
If mainname is null, no compile is done
rv = Repository("COMPILE", EntID, 0, "", "", EntID[-1, "B*"], StatusCode) Status = Get_Status(Err) If rv EQ 0 then Response = SRP_Editor_Utility("PROCESSERRORS", If Len(StatusCode) then StatusCode else Err) end else SuspectedVNAVs = StatusCode end
The StatusCode parameter will be errors if the compilation failed and VNAVs if it succeeded.
I will try that out.
Funny, appears that Rev still uses BLINT, so you must have dug very deep (as usual)
This is working:
subroutine bsbs_check_compile_vnavs(Void) $insert LOGICAL Declare Function get_repos_entities,rti_resolve_main_stprocname,Repository,get_Status,Unassigned declare function SRP_Editor_Utility declare subroutine Set_Status AppId=@appID<1> entities = get_repos_entities(AppId, 'STPROC', '', '', '', '', '') compile_errors = null$ vnavs = null$ statuscode = null$ Err =null$ col = null$ Loop bRemove entity From entities At col Setting mark While entity != "" AppId =entity[1,"*"] mainname = rti_resolve_main_stprocname(entity) ProgID =mainname:"*":AppId ProcSource =xlate("SYSPROCS",ProgID,"","X") SourceName =field(ProcSource,"(",1)[-1,"B "] if (mainname) and (mainname _eqc SourceName) then Set_Status(0) rv = Repository("COMPILE", entity, 0, "", "", mainname, StatusCode) Status = Get_Status(Err) If rv EQ 0 then Response = SRP_Editor_Utility("PROCESSERRORS", If Len(StatusCode) then StatusCode else Err) convert @vm:@svm to "||" in Response loop while response ThisResponse =Response[1,@fm] Response[1,col2()] =null$ compile_errors := AppId:@vm:mainname:@vm:ThisResponse :@fm Repeat end else SuspectedVNAVs = StatusCode if SuspectedVNAVs then loop while SuspectedVNAVs ThisVNAV =SuspectedVNAVs[1,@fm] SuspectedVNAVs[1,col2()] =null$ vnavs := AppId:@vm:mainname:@vm:ThisVNAV[1,@vm] :@fm Repeat end end end repeat compile_errors[-1,1] =null$ vnavs[-1,1] =null$ call write_Row('SYSLISTS', 'COMPILE_ERRORS', compile_errors, 0) call write_Row('SYSLISTS', 'VNAVS', vnavs, 0) return