Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions src/IBMiDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export type Db2FeatureIds = `SELF`;
const featureRequirements: { [id in Db2FeatureIds]: { [osVersion: number]: number } } = {
'SELF': {
7.4: 26,
7.5: 5
7.5: 5,
7.6: 1
}
};

Expand Down Expand Up @@ -38,16 +39,15 @@ export class IBMiDetail {
this.setFeatureSupport(featureId, false);
}

const instance = getInstance();
const content = instance.getContent();
const connection = getInstance().getConnection();

let levelCheckFailed = false;

const versionResults = await content.runSQL(`select OS_VERSION concat '.' concat OS_RELEASE as VERSION from sysibmadm.env_sys_info`);
const versionResults = await connection.runSQL(`select OS_VERSION concat '.' concat OS_RELEASE as VERSION from sysibmadm.env_sys_info`);
this.version = Number(versionResults[0].VERSION);

try {
const db2LevelResults = await content.runSQL([
const db2LevelResults = await connection.runSQL([
`select max(ptf_group_level) as HIGHEST_DB2_PTF_GROUP_LEVEL`,
`from qsys2.group_ptf_info`,
`where PTF_GROUP_DESCRIPTION like 'DB2 FOR IBM I%' and`,
Expand Down Expand Up @@ -77,11 +77,8 @@ export class IBMiDetail {
}

private async validateSelfInstallation() {
const instance = getInstance();
const content = instance.getContent();

try {
await content.runSQL(`values SYSIBMADM.SELFCODES`);
await getInstance().getConnection().runSQL(`values SYSIBMADM.SELFCODES`);

// This means we have the SELF feature
return true;
Expand Down
Loading