Compile Time Data Array in RPGLE - IBM i / AS400

 Source Code For Compile Time Data Array:-

**Free                                                                                                                   

    // Compile Time Array Declaration                                                                                          

    DCL-S Days   Varchar(3) Dim(6) perrcd(3) ctdata;                                                                         

    // Variable Declration                                                                                                  

    DCL-S Index Zoned(4) Inz(1);                                   

    DCL-S Result Varchar(20) Inz;                                                                                             

    // Executing loop to fetch record from Compile time data array                                                           

    Dow ( Index <= 6);                                             

      Result = Days(Index);                                        

      Dsply Result;                                                

      Index = Index + 1;                                           

    Enddo;                            

    *inlr = *on;        

                               

 ** Compile Time Data Array    

 MonTueWed                     

 ThrFriSat                             


Subscribe Tech Sharmit for more videos on IBMi / AS400

Please refer to the below video for the same topic.        


             

Comments

Popular posts from this blog

Dynamic XMl file creation in IFS using RPGLE Program - IBMI / AS400

Numeric Data type in RPGLE free format - IBM i / AS400