× Discuss about Upgrade, What are the pre-requesties, Scoping, Actual Upgrade, Upgrade Testing, Technical Testing, Functional Testing, Local code conversion, Core upgrade, Local upgrade, etc…

Missing VM in ENQUIRY

  • jpb
  • jpb's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • retired
More
11 years 11 months ago - 11 years 11 months ago #13227 by jpb
Missing VM in ENQUIRY was created by jpb
Some of you might also have noticed that the field OPEN.BRACKET, CLOSE.BRACKET and REL.NEXT.FIELD in ENQUIRY have not been updated with the correct number of VM during upgrade to G14.

This doesn't matter until you want to change one of this enquiries using desktop - only the first defined selectionfield is shown in designer!

To correct this here a small routine to add the missing VM
PROGRAM CORR.EQ.MV

    $INSERT I_COMMON
    $INSERT I_EQUATE
    $INSERT I_F.ENQUIRY

    FN.EQ = 'F.ENQUIRY'
    F.EQ  = ''
    OPEN FN.EQ TO F.EQ ELSE ABORT
    ID.LIST = ''
    CMD  = 'SELECT F.ENQUIRY WITH EVAL"SELECTION.FLDS<1,2>" NE "" '
    CMD := 'AND WITH EVAL"OPEN.BRACKET;COUNT(@1,@VM)" LT 1'
    EXECUTE CMD

    LOOP
        READNEXT EQ.ID ELSE EQ.ID = ""
    WHILE EQ.ID
        READU R.EQ FROM F.EQ, EQ.ID ELSE ABORT
        IF R.EQ THEN
            COUNT.VM = COUNT(R.EQ<ENQ.SELECTION.FLDS>,VM)
            FOR I = 1 TO COUNT.VM
                FOR FPOS = ENQ.OPEN.BRACKET TO ENQ.REL.NEXT.FIELD
                    ACT.VM = COUNT(R.EQ<FPOS>,VM)
                    ADD.VM = COUNT.VM - ACT.VM
                    FOR II = 1 TO ADD.VM
                        R.EQ<FPOS> := VM
                    NEXT II
                NEXT FPOS
            NEXT I
            WRITE R.EQ TO F.EQ, EQ.ID
            CRT EQ.ID "35L":" ":COUNT.VM "3R":" ":R.EQ<ENQ.OPEN.BRACKET>
            CRT SPACE(40):R.EQ<ENQ.OPEN.BRACKET>
            CRT SPACE(40):R.EQ<ENQ.SELECTION.FLDS>
            CRT SPACE(40):R.EQ<ENQ.SEL.LABEL>
            CRT SPACE(40):R.EQ<ENQ.SEL.FLD.OPER>
            CRT SPACE(40):R.EQ<ENQ.REQUIRED.SEL>
            CRT SPACE(40):R.EQ<ENQ.CLOSE.BRACKET>
            CRT SPACE(40):R.EQ<ENQ.REL.NEXT.FIELD>
        END
    REPEAT

    STOP
**************
END
Last edit: 11 years 11 months ago by jpb.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds