File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1265,12 +1265,13 @@ export default class IBMi {
1265
1265
* @param statements
1266
1266
* @returns a Result set
1267
1267
*/
1268
- async runSQL ( statements : string ) : Promise < Tools . DB2Row [ ] > {
1268
+ async runSQL ( statements : string , opts : { userCcsid ?: number } = { } ) : Promise < Tools . DB2Row [ ] > {
1269
1269
const { 'QZDFMDB2.PGM' : QZDFMDB2 } = this . remoteFeatures ;
1270
1270
1271
1271
if ( QZDFMDB2 ) {
1272
1272
const ccsidDetail = this . getEncoding ( ) ;
1273
- const possibleChangeCommand = ( ccsidDetail . fallback && ! ccsidDetail . invalid ? `@CHGJOB CCSID(${ ccsidDetail . ccsid } );\n` : '' ) ;
1273
+ const useCcsid = opts . userCcsid || ( ccsidDetail . fallback && ! ccsidDetail . invalid ? ccsidDetail . ccsid : undefined ) ;
1274
+ const possibleChangeCommand = ( useCcsid ? `@CHGJOB CCSID(${ useCcsid } );\n` : '' ) ;
1274
1275
1275
1276
const output = await this . sendCommand ( {
1276
1277
command : `LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"` ,
You can’t perform that action at this time.
0 commit comments