Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with SETLL and READE OpCodes

Status
Not open for further replies.

Kevin S.

Programmer
Jun 29, 2018
1
NI
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.

Thanks.

Code:
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*  WIP LOCATED ON SECTION "W" LOCATION "001"         
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top