Skip to content

Commit abf6716

Browse files
committed
Remove override CCSID ability
Signed-off-by: worksofliam <[email protected]>
1 parent 07bd1b1 commit abf6716

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

src/api/IBMi.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ export default class IBMi {
5050
private runtimeCcsid: number = CCSID_SYSVAL;
5151
/** User default CCSID is job default CCSID */
5252
private userDefaultCCSID: number = 0;
53-
/** override allows the API to hardcode a CCSID. Usually good for testing */
54-
private overrideCcsid: number | undefined;
5553

5654
client: node_ssh.NodeSSH;
5755
currentHost: string = ``;
@@ -1293,13 +1291,9 @@ export default class IBMi {
12931291
}
12941292
}
12951293

1296-
setOverrideCcsid(ccsid: number | undefined) {
1297-
this.overrideCcsid = ccsid;
1298-
}
1299-
13001294
getEncoding() {
1301-
const fallback = this.overrideCcsid !== undefined || ((this.runtimeCcsid < 1 || this.runtimeCcsid === 65535) && this.userDefaultCCSID > 0 ? true : false);
1302-
const ccsid = fallback ? (this.overrideCcsid || this.userDefaultCCSID) : this.runtimeCcsid;
1295+
const fallback = ((this.runtimeCcsid < 1 || this.runtimeCcsid === 65535) && this.userDefaultCCSID > 0 ? true : false);
1296+
const ccsid = fallback ? (this.userDefaultCCSID) : this.runtimeCcsid;
13031297
return {
13041298
fallback,
13051299
ccsid,
@@ -1312,7 +1306,6 @@ export default class IBMi {
13121306
origin: this.runtimeCcsidOrigin,
13131307
runtimeCcsid: this.runtimeCcsid,
13141308
userDefaultCCSID: this.userDefaultCCSID,
1315-
overrideCcsid: this.overrideCcsid,
13161309
};
13171310
}
13181311
}

src/testing/encoding.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ import { getMemberUri } from "../filesystems/qsys/QSysFs";
1010

1111
export const EncodingSuite: TestSuite = {
1212
name: `Encoding tests`,
13-
after: async () => {
14-
const connection = instance.getConnection();
15-
connection?.setOverrideCcsid(undefined);
16-
},
17-
1813
before: async () => {
1914
const config = instance.getConfig()!;
2015
assert.ok(config.enableSourceDates, `Source dates must be enabled for this test.`);
@@ -32,8 +27,6 @@ export const EncodingSuite: TestSuite = {
3227

3328
const tempLib = config!.tempLibrary;
3429

35-
connection?.setOverrideCcsid(37);
36-
3730
const file = `TEST37`;
3831

3932
await connection!.runCommand({ command: `CRTSRCPF FILE(${tempLib}/${file}) RCDLEN(112) CCSID(37)`, noLibList: true });

0 commit comments

Comments
 (0)