XPED Quick Tip

In Xped a DB2 query is replaced by a PERFORM until and a call like this:
 
*****         CLM_GEN =                        
*****          :DCLCLIAM.CL-CL-ID AND
*****         CL_STATUS = :DCLCLAIM.CL-STATUS
*****END-EXEC                                           
==>  PERFORM SQL-INITIAL UNTIL SQL-INIT-DONE            
     CALL 'DSNHLI' USING SQL-PLIST2                                                                      
 
First time execution of a DB2 query in a module will take the program flow inside the given SQL-INITIAL para:
 
PROCEDURE DIVISION                                              
    USING COMMUNICATION-AREA.                          
                                                                
DSNSQL SECTION.                                                 
SQL-SKIP.                                                       
    GO TO SQL-INIT-END.                                         
SQL-INITIAL.                                                    
==>  MOVE 1 TO SQL-INIT-FLAG.                                    
    CALL 'DSNHADDR' USING SQL-VPARMPTR OF SQL-PLIST2 SQL-PVAR-LIS
    T2.                                                         
    CALL 'DSNHADD2' USING SQL-PVAR-ADDRS1 IN                    
 
Two ways to avoid this are:
1. Put a breakpoint on call statement just after perform. In no circumstances you would require to go into the perform of SQL-INITIAL.
2. If in hurry you forget to do so and entered into such a call, then do “F Continue”
Put a break point there and do a PF12
 
D-CLM-HDR SQL-NULL                                   
CALL 'DSNHADDR' USING SQL-CODEPTR OF SQL-PLIST4 SQLCA.
SQL-INIT-END.                                            
 B    CONTINUE.                                            
 
Nobody will say you have successfully rectified your mistake but you have J.

Cheers!!

Nishant

comments powered by Disqus