Those options are compile time options, not execution time options. It's
just an easier way of remembering to use
CRTSQLRPGI OBJ(MYLIB/MYPGM) COMMIT(*CS) CLOSQLCSR(*ENDMOD) DATFMT(*ISO)
See also:
DSPPGM PGM(ROB/AAASQL) DETAIL(*MODULE)
5=Display description
DB2 for IBM i module attributes:
Number of SQL statements . . . . . . . . . . . : 2
Commitment control . . . . . . . . . . . . . . : *NONE
Relational database . . . . . . . . . . . . . : *LOCAL
Naming convention . . . . . . . . . . . . . . : *SYS
Allow copy of data . . . . . . . . . . . . . . : *OPTIMIZE
Allow blocking . . . . . . . . . . . . . . . . : *ALLREAD
Delay PREPARE . . . . . . . . . . . . . . . . : *NO
Close SQL cursor . . . . . . . . . . . . . . . : *ENDACTGRP
Date format . . . . . . . . . . . . . . . . . : *ISO
Date separator . . . . . . . . . . . . . . . . : /
Time format . . . . . . . . . . . . . . . . . : *HMS
Time separator . . . . . . . . . . . . . . . . : :
Default Collection name . . . . . . . . . . . : *NONE
More...
See also:
Retrieve Program Information (QCLRPGMI) API
PGMI0200 Format
Program SQL information
Continuation of program SQL information
at:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/qclrpgmi.htm
So, if your question is: Do you need to retrieve this information so that
you can change it back as you return back up the call stack the answer is
no.
But if you want to pass the state of whatever your program is on to STRSQL
you could use the API to retrieve the program information and then use
that to pass on to the appropriate parameters in STRSQL.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.