Now, Get RPG Codes in all three formats only on this website on every RPGLE related programming article.

Fixed, /Free and Fully Free RPG


Browse and Copy in SEU AS400

Browse and Copy in SEU AS400
Browse and Copy in SEU AS400,
Browse and Copy in SEU AS400

Browse and Copy option

Open any source member in Edit mode either using WRKMBRPDM or STRSEU as below.

 Columns . . . :    6 100                                       Edit                                              EASYCLASS1/ILERPG
 SEU==>                                                                                                                     ILEPGM1
 FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Comments++++++++++++                            
        *************** Beginning of data ***************************************************************************************  
0001.00 H                                                                                                   211204                 
0002.00 F                                                                                                   211204                 
0003.00  * Global variables (accessible to all sub procedures local to this program)                        200811                 
0004.00 D Sum             S              4P 0                                                               200811                 
0005.00                                                                                                     200811                 
0006.00                                                                                                     200811                 
0007.00  * SubProcedure prototype                                                                           200811                 
0008.00 DSubProcedure1    PR             4P 0                                      * Return                 200811                 
0009.00 D                                4P 0  VALUE                               * Num 1                  200811                 
0010.00 D                                4P 0  VALUE                               * Num 2                  200811                 
0011.00  /Free                                                                                              200811                 
0012.00       Sum = 0; // Initialize global variable                                                        200811                 
0013.00       Sum = SubProcedure1(5:10);                                                                    200811                 
0014.00       Sum = SubProcedure1(5:10);                                                                    201008                 
0015.00       DSPLY Sum;                                                                                    200811                 
0016.00       *INLR  = *ON;                                                                                 200811                 
0017.00  /End-Free                                                                                          200811                 
0018.00                                                                                                     200811                 
0019.00                                                                                                     200811                 

Now press SHIFT + F3 to opt for Browse/Copy option

                          Browse/Copy Options                             
                                                                          
Type choices, press Enter.                                                
                                                                          
  Selection . . . . . . . . . . .   1              1=Member               
                                                   2=Spool file           
                                                   3=Output queue         
  Copy all records  . . . . . . .   N              Y=Yes, N=No            
  Browse/copy member  . . . . . .   ILEPGM1        Name, F4 for list      
    File  . . . . . . . . . . . .     ILERPG       Name, F4 for list      
      Library . . . . . . . . . .       EASYCLASS1 Name, *CURLIB, *LIBL   
                                                                          
  Browse/copy spool file  . . . .   ILEPGM1        Name, F4 for list      
    Job . . . . . . . . . . . . .     ILEPGM1      Name                   
      User  . . . . . . . . . . .       EASYCLASS  Name, F4 for list      
      Job number  . . . . . . . .       *LAST      Number, *LAST          
    Spool number  . . . . . . . .     *LAST        Number, *LAST, *ONLY   
                                                                          
  Display output queue  . . . . .   QPRINT         Name, *ALL             
    Library . . . . . . . . . . .     *LIBL        Name, *CURLIB, *LIBL   
                                                                          
F3=Exit       F4=Prompt       F5=Refresh       F12=Cancel                 
F13=Change session defaults   F14=Find/Change options                     

You can browse any source member in any source physical file of any library and even spool files.

 Columns . . . :    6 100                                       Edit                                     Pending . . . . . :   *   
 SEU==>                                                                                                                            
 FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Comments++++++++++++                            
        *************** Beginning of data ***************************************************************************************  
        H                                                                                                   211204                 
0002.00 F                                                                                                   211204                 
0003.00  * Global variables (accessible to all sub procedures local to this program)                        200811                 
0004.00 D Sum             S              4P 0                                                               200811                 
0005.00                                                                                                     200811                 
0006.00                                                                                                     200811                 
0007.00  * SubProcedure prototype                                                                           200811                 
0008.00 DSubProcedure1    PR             4P 0                                      * Return                 200811                 
                                                                                                                                   
 Columns . . . :    6 100                                      Browse                                             EASYCLASS1/ILERPG
 SEU==>                                                                                                                     ILEPGM2
        *************** Beginning of data ***************************************************************************************  
0001.00 H                                                                                                   200616                 
0002.00 DMain             PR                   EXTPGM('ILEPGM2')                                            200811                 
0003.00 D                                4P 0  VALUE                               * Num 1                  200811                 
0004.00 D                                4P 0  VALUE                               * Num 2                  200811                 
0005.00 D                                4P 0  VALUE                               * Sum                    200811                 
0006.00 DMain             PI                                                                                200811                 
0007.00 D num1                           4P 0  VALUE                               * Num 1                  200811                 
                                                                                                                                   
 F3=Exit   F4=Prompt   F5=Refresh   F9=Retrieve   F11=Toggle   F12=Cancel                                                          
 F16=Repeat find       F17=Repeat change          F24=More keys                                                                    

Use Copy commands in Browse member and use Add commands in Edit member to copy at target location before or after the line.

 Columns . . . :    6 100                                       Edit                                     Pending . . . . . :   *   
 SEU==>                                                                                                                            
 FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Comments++++++++++++                            
        *************** Beginning of data ***************************************************************************************  
        H                                                                                                   211204                 
A002.00 F                                                                                                   211204                 
0003.00  * Global variables (accessible to all sub procedures local to this program)                        200811                 
0004.00 D Sum             S              4P 0                                                               200811                 
0005.00                                                                                                     200811                 
0006.00                                                                                                     200811                 
0007.00  * SubProcedure prototype                                                                           200811                 
0008.00 DSubProcedure1    PR             4P 0                                      * Return                 200811                 
                                                                                                                                   
 Columns . . . :    6 100                                      Browse                                             EASYCLASS1/ILERPG
 SEU==>                                                                                                                     ILEPGM2
        *************** Beginning of data ***************************************************************************************  
0001.00 H                                                                                                   200616                 
CC02.00 DMain             PR                   EXTPGM('ILEPGM2')                                            200811                 
0003.00 D                                4P 0  VALUE                               * Num 1                  200811                 
0004.00 D                                4P 0  VALUE                               * Num 2                  200811                 
CC05.00 D                                4P 0  VALUE                               * Sum                    200811                 
0006.00 DMain             PI                                                                                200811                 
0007.00 D num1                           4P 0  VALUE                               * Num 1                  200811                 

lines copied

 Columns . . . :    6 100                                       Edit                                              EASYCLASS1/ILERPG
 SEU==>                                                                                                                     ILEPGM1
 FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Comments++++++++++++                            
        *************** Beginning of data ***************************************************************************************  
0001.00 H                                                                                                   211204                 
0002.00 F                                                                                                   211204                 
0003.00 DMain             PR                   EXTPGM('ILEPGM2')                                            211204                 
0004.00 D                                4P 0  VALUE                               * Num 1                  211204                 
0005.00 D                                4P 0  VALUE                               * Num 2                  211204                 
0006.00 D                                4P 0  VALUE                               * Sum                    211204                 
0007.00  * Global variables (accessible to all sub procedures local to this program)                        200811                 
0008.00 D Sum             S              4P 0                                                               200811                 
                                                                                                                                   
 Columns . . . :    6 100                                      Browse                                             EASYCLASS1/ILERPG
 SEU==>                                                                                                                     ILEPGM2
        *************** Beginning of data ***************************************************************************************  
0001.00 H                                                                                                   200616                 
0002.00 DMain             PR                   EXTPGM('ILEPGM2')                                            200811                 
0003.00 D                                4P 0  VALUE                               * Num 1                  200811                 
0004.00 D                                4P 0  VALUE                               * Num 2                  200811                 
0005.00 D                                4P 0  VALUE                               * Sum                    200811                 
0006.00 DMain             PI                                                                                200811                 
0007.00 D num1                           4P 0  VALUE                               * Num 1                  200811                 
                                                                                                                                   

Related Post

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain