• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

VVOUT Causing Decimal Data Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VVOUT Causing Decimal Data Error

    Hi,
    I am experiencing an error with trying to build a tree grid using VVDSTREE1 data structure and vvOut_toJSON.
    I built the data via a FOR...LOOP into an array (dsTree)

    Code:
       for nCnt = 1 to nTtlRecs;
          eval-corr dsTree(nCnt) = dsData(nCnt);
          dsTree(nCnt).VVLEVEL = 1;
          dsTree(nCnt).VVQTIP = ' ';
          dsTree(nCnt).VVTEXT = %trim(dsData(nCnt).SKUNUM);
          dsTree(nCnt).VVID = %trim(dsData(nCnt).SKUNUM);
          dsTree(nCnt).VVLEAF = IIf(bNode:'true':'false');
       endfor;
    
       vvOut.noNullChildren = IIf(bNode:'0':'1');
       vvOut.object='VVDSTREE1';
       vvOut_toJSON(vvOut:%addr(dsTree):nCnt);
    The error appeared to come from the procedure EXTRACTVALUE of VVOUT in VVSRVPGM.

    VVError.PNG

    The line in error:

    Code:
     Program:   VVSRVPGM       Library:   VALENCE41      Module:   VVOUT                   
       3447           LBCPYNV(%addr(BigZoned):out_attr:dtaPtr:in_attr);                    
       3448           if BigZoned=0;                                                       
       3449            inValue='0';                                                        
       3450           else;                                                                
       3451            inValue=%trim(%editc(BigZoned:'P'));                                
       3452            inValue=%trim(%xlate('0':' ':inValue:%checkr('0':inValue)));
    When checking deeper, I noticed that the value in IN_ATTR.TYPE is not recognizable.

    vverror2.png

    But interestingly enough, the definition of the value should have been TYPE_ZONED:

    Code:
     d TYPE_ZONED      c                   const(x'02')
    How can this be fixed?
    Is there any tree grid example (on the Ext.js side using VVDSTREEx) that I can look at?
    I see only RPG example but not the corresponding javascript.

    Thanks,

  • #2
    Hi,

    Not sure what's going on with that, but we've added a much more practical example of building output for Ext JS trees in Valence 5, which will be available this coming Sunday. So if you can wait a few days you'll be able to see a much better approach to loading up the tree data on the back-end (along with corresponding front-end code).

    Comment

    Working...
    X