EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
Expand all | Collapse all

two dimensions sequences of data

  • 1.  two dimensions sequences of data

    Posted Fri March 27, 2015 04:26 AM

    Hi,

    I have  a sequence of data,how create two dimension table in handler of EGL WEB?

    It need to charge the data by columns and rows in the order(handler of WEB EGL).

    something like this

                              PUT KABELA:        


     2411  2403  2402  2051  2050  2085  2058  2059  2060  2063  3320  3307   
     6541  6531  6528  6521  6548  6517  6516  6512  6504  3575  3564  3543   
     3530  3527  3524  3520  6552  3518  3515  3514  3509  3506  3407  3410   
     3662  3661  3659  3649  3647  3645  3636  3635  3634  3630  3629  3627   
     3622  3619  3614  3611  3609  3667  3605  3603  3602  3601  4718  4719   
     4720  4721  4722  4820  4819  4818  4817  4836  4835  4834  4833  6822   
     4847  4845  6821                                                         
                                                                             

    instead of  this attach files (in programs filed is define

    record BENOUM01 type BasicRecord    
        BNDI0001 num(4);    
    end

    handler.....type JSFHandler
    .......
     viewRoot UIViewRoot;
    BENOUM01 BENOUM01[0];.....

    Bye

     

     

    nasja


  • 2.  Re: two dimensions sequences of data

    Posted Fri March 27, 2015 06:55 AM

    Nasja,

    Looks this sample.

    package sample;
     
    record Outfile type CSVRecord{fileName = "Outfile"}
        recOutfile string;
    end
     
    record Work type BasicRecord
        03 Field_dim_1      [3];
           05 Field_dim_2    char(15)[4];
    end
     
    program sample2 type BasicProgram
     
        Outfile Outfile;
    Work Work;
     
        function main()
            Outfile.resourceAssociation = "C:\\TEMP\\output.TXT";
            set Outfile empty;
     
            Work.Field_dim_2[1][1] = "Row-1/Col-1 ";
            Work.Field_dim_2[1][2] = "Row-1/Col-2 ";
            Work.Field_dim_2[1][3] = "Row-1/Col-3 ";
            Work.Field_dim_2[1][4] = "Row-1/Col-4 ";
    Outfile.recOutfile = Work.Field_dim_1[1];
    SysLib.writeStdout(Outfile.recOutfile);
     
            Work.Field_dim_2[2][1] = "Row-2/Col-1 ";
            Work.Field_dim_2[2][2] = "Row-2/Col-2 ";
            Work.Field_dim_2[2][3] = "Row-2/Col-3 ";
            Work.Field_dim_2[2][4] = "Row-2/Col-4 ";
    Outfile.recOutfile = Work.Field_dim_1[2];
    SysLib.writeStdout(Outfile.recOutfile);
     
            Work.Field_dim_2[3][1] = "Row-3/Col-1 ";
            Work.Field_dim_2[3][2] = "Row-3/Col-2 ";
            Work.Field_dim_2[3][3] = "Row-3/Col-3 ";
            Work.Field_dim_2[3][4] = "Row-3/Col-4 "; 
    Outfile.recOutfile = Work.Field_dim_1[3];
    SysLib.writeStdout(Outfile.recOutfile);
     
        end
    end

    Regards.

    Hsieh


  • 3.  Re: two dimensions sequences of data

    Posted Fri March 27, 2015 09:28 AM

    Hello,

    i have followed your instructions, but the result was not good

    Look in attachments to see program and result.

    I need dates in horizontal ( at least 10-12 columns), and rows as much as required.

    Thank you for your help.

    Kind regards.

    Nasja

    nasja


  • 4.  Re: two dimensions sequences of data

    Posted Fri March 27, 2015 01:19 PM

    Nasja,

    there are two line of code in the wrong place

            while(b5bid not ioerror)

                i = i + 1;
                j = 0;
                while(j < 10 and b5bid not ioerror)
                    j = j + 1;
                    Work.Field_dim_2[i][j] = b5bid.bndi0021;
     
                    Outfile.recOutfile = Work.Field_dim_1[i];
                    SysLib.writeStdout(Outfile.recOutfile);
                    tests1();
                end
     
            end
    fix to:

            while(b5bid not ioerror)

                i = i + 1;
                j = 0;
                while(j < 10 and b5bid not ioerror)
                    j = j + 1;
                    Work.Field_dim_2[i][j] = b5bid.bndi0021;
                    tests1();
                end
                Outfile.recOutfile = Work.Field_dim_1[i];
                SysLib.writeStdout(Outfile.recOutfile);
     
            end
     

     

    Hsieh