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

Comments

  • Use the COMPILE method for the Repository function to compile your code. Use the Blint() stored procedure to check for VNAVs. Blint is not documented, but you can pretty easily figure out how to call it by looking at the argument names.
  • Thanks, because RTP5 is not the way to go, judging by the results!!!

  • edited September 12
    Appears to miss the inserts

    Errors =blint(ProgID,Code)

    Not sure about the interpretation of the other params:


  • Might I suggest that you create a simple hook so you can observe the incoming and outgoing values when you do a normal compile?
  • Yes you may 😁
  • Ah of cause, MD hook for BLINT.

    Thanks
  • Nope, had to go with:
    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
  • Nope, Warnings are not returned.

    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

  • Is this OI 9 or 10?
  • OI10 - I think I need to get BLINT working
  • if I do this:
    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
  • edited September 13
    I asked because OI 10 actually doesn't need to use BLINT. Here's what the SRP Editor does:

    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.
  • Thank you so much.
    I will try that out.
    Funny, appears that Rev still uses BLINT, so you must have dug very deep (as usual)
  • edited September 14
    FYI
    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
Sign In or Register to comment.