Embedded SQL Example è  Make dynamic query by making a placeholder ‘?’ in the query

 

 

 


Columns . . . :    6  80                        Browse                          AMIT/QRPGLESRC
SEU==>                                                                              EMBED_STM5
FMT H  HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        *************** Beginning of data ****************************************************
0001.00 HDEBUG(*YES)                                                                    130215
0002.00 HOPTION(*NODEBUGIO)                                                             130215
0003.00  *                                                                              130215
0004.00 DFLD0001          S             10A   INZ('IROBO')                              130218
0005.00 DFLD0002          S             12A   INZ('P00000000001')                       130218
0006.00 DSQLSTMT1         S            350                                              130218
0007.00  *                                                                              130215
0008.00 C                   eval      SQLSTMT1='UPDATE PARTYD SET PNAME=? ' +           130218
0009.00 C                                      'WHERE PNUM=?'                           130218
0010.00 C/EXEC SQL                                                                      130215
0011.00 C+ PREPARE UPD_STMT FROM :SQLSTMT1                                              130218
0012.00 C/END-EXEC                                                                      130215
0013.00  *                                                                              130218
0014.00 C/EXEC SQL                                                                      130218
0015.00 C+ EXECUTE UPD_STMT USING :FLD0001,:FLD0002                                     130218
0016.00 C/END-EXEC                                                                      130218
0017.00  *                                                                              130218
0018.00 C                   SETON                                        LR             130218
0019.00 C*_________________________________________________                             130215
        ****************** End of data *******************************************************


 











User Comments:



Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy