Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help with SETLL and READE OpCodes

Help with SETLL and READE OpCodes

Help with SETLL and READE OpCodes

Hello Everyone, I beginner working with AS400 I need some intruction, what I'm trying to do it's to move all records that match with my Keylist WIPKEY(STYLE,STYCLR,DIM) located in WIPSEC "W" PLTLOC "001" on the logical file WIPPLL15.

With this source I am getting the same record. over an over.



FGLTSUL02IF  E           K        DISK                       
FWIPPLL15IF  E           K        DISK                       
FEXPGLWP O   E           K        DISK                      A
I           UDS                                              
I                                        1   60GLSSAV        
I                                        7   9 SECSAV        
C/SPACE 1                                                    
C*  SET UP CONSTANT(S)                                       
C/SPACE 1                                                    
C                     MOVEL'09'      PLTNBR  2               
C/SPACE 1                                                    
C*  SET UP KEY(S)                                            
C/SPACE 1                                                    
C           GLSKEY    KLIST                                  
C                     KFLD           GLSSAV                  
C                     KFLD           PLTNBR                  
C                     KFLD           SECSAV                  
C           GL2KEY    KLIST                                  
C                     KFLD           GLSSAV           
C                     KFLD           PLTNBR           
C           WIPKEY    KLIST                           
C                     KFLD           STYLE            
C                     KFLD           STYCLR           
C                     KFLD           DIM              
C/SPACE 1                                             
C*  SET LOWER LIMITS ON GLTSUMP                       
C/SPACE 1                                             
C           SECSAV    IFNE *BLANKS                    
C           GLSKEY    SETLLGLTSUL02             99    
C                     ELSE                            
C           GL2KEY    SETLLGLTSUL02             99    
C                     ENDIF                           
C           *IN99     CABEQ*ON       END              
C/SPACE 1                                             
C           READ1     TAG                             
C                     READ GLTSUL02                 98
C           *IN98     CABEQ*ON       END              
C           SECSAV    IFNE *BLANKS                    
C           SECSAV    CABNEPLTSEC    END          
C                     ENDIF                       
C           GLSSAV    CABNEGLSNBR    READ1        
C           SCNQTY    CABEQSIZQTY    READ1        
C           SIZQTY    DIV  12        SIZDOZ  50   
C           SCNQTY    DIV  12        SCNDOZ  50   
C           SIZDOZ    SUB  SCNDOZ    UNADOZ  50   
C                     MOVELSIZDOZ    SIZQTY       
C                     MOVELSCNDOZ    SCNQY        
C                     MOVELUNADOZ    UAS01        
C/SPACE 1                                         
C* SAVE PLANT SECTION AND SIZE                    
C/SPACE 1                                         
C                     MOVELPLTSEC    GLTSEC  3    
C                     MOVELSIZE      GLTSIZ  4    
C/SPACE 1                                         
C* SETLLL ON WIPPLL15                             
C/SPACE 1                                         
C           WIPKEY    SETLLWIPPLL15             97
C           *IN97     CABEQ'1'       READ1            
C/SPACE 1                                             
C           READE     TAG                             
C           WIPKEY    READEWIPPLL15                 96
C           *IN96     CABEQ'1'       BEGIN            
C           GLTSIZ    CABNESIZE      READE            
C                     MOVELPLTSEC    WIPSEC  3        
C/SPACE 1                                             
C/SPACE 1                                             
C           WIPSEC    IFEQ 'W'                        
C           PLTLOC    ANDEQ'001'                      
C                     Z-ADD*ZEROS    W01WRK  50       
C           BUNQTY    DIV  12        W01WRK  50       
C                     MOVELW01WRK    W001    50       
C                     ENDIF                           
C           BEGIN     TAG                             
C                     GOTO READE                      
C/SPACE 1                                             
C*  WRITE EXPGLWP                                 
C/SPACE 1                                         
C                     WRITEEXPGLW                 
C                     GOTO READ1                  
C/SPACE 1                                         
C* END PROGRAM                                    
C/SPACE 1                                         
C           END       TAG                         
C                     SETON                     LR
C                     RETRN 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close