genevaers / Workbench

GenevaERS Workbench
Apache License 2.0
3 stars 2 forks source link

Correct Code Table SQL to have latest values #119

Closed KipTwitchell closed 3 months ago

KipTwitchell commented 4 months ago

The 4.20 code table SQL has four values in it that should not be there: INSERT INTO :schemaV.CODE VALUES('GROUPAGGR','FIRST',5,'First'); INSERT INTO :schemaV.CODE VALUES('GROUPAGGR','LAST',6,'Last'); INSERT INTO :schemaV.CODE VALUES('RECORDAGGR','FIRST',5,'First'); INSERT INTO :schemaV.CODE VALUES('RECORDAGGR','LAST',6,'Last');

The SQL correctly does not include the XIF format or the DB2Direct codes, which are two other recent code changes.

Code table values can be either "Payload" fields, (like the JCL parameters,) not used elsewhere in the workbench but used in the performance engine, or "non-payload" fields that trigger differing code paths. In investigating the code, I need to determine if the above values are payload or not.

An example of a Non--payload code would be "'OUTPUTMED" which clearly triggers code paths. I will use this to compare to the code paths for the above.

Besides the SQL to create the Code table, In looking at the code, to see if these values are used, I find the following: GROUPAGGR: plugins\genevagui\src\com\ibm\safr\we\model\view\ViewColumn.java: The code around line 712 has case statements case Codes.DETAIL_FIRST: RECORDAGGR Same module around line 544 it has a similar case structure.

plugins\genevagui\src\com\ibm\safr\we\ui\editors\view\ViewExtractEditor.java: line 166 has more logic that might be applicable, but nothing that is specific to the code values.

KipTwitchell commented 4 months ago

@hammyau, can you give me your opinion. It appears the Postgres SQL in the Repo today is perhaps behind the DB2 scripts.

1) Postgres HAS the following the DB2 does not have:

INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('CRECTYPE','NONE', 1, 'None'); INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('CRECTYPE','SKIP', 2, 'Skip'); INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('CRECTYPE','VERFY',3, 'Verify');

INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('FLDCONTENT','NONE', 0, 'Unspecified');

INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('FLDDELIM','FIXED',5, 'Fixed Width - Position && Length');

INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('SUBTOT','NONE', 1, 'None'); INSERT INTO &$DBSCH..CODETABLE TABLE VALUES('RECORDAGGR','NONE',1,'None');

INSERT INTO &$DBSCH..CODETABLE TABLE VALUES('GROUPAGGR','NONE',1,'None');

2) DB2 HAS these values that Postgres is missing:

INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('DESTTYPE','MAILU',1, 'Email To User', NULL,NULL,NULL,0); INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('DESTTYPE','MAILG',2, 'Email To Group', NULL,NULL,NULL,0);

INSERT INTO &$DBSCH..CODETABLE TABLE VALUES ('FILETYPE','PEXIT', 8, 'Read User-Exit - Pipe', NULL,NULL,NULL,0);

hammyau commented 4 months ago

You need to run this past Randall and Michael.

KipTwitchell commented 4 months ago

@michael-shapiro @rhness Can we review this? It seems to me all of the changes in the postgress SQL should be dropped, and all the changes in the DB2 SQL should be added to postgress.

KipTwitchell commented 3 months ago

DB2 tables added, as well as updated.

KipTwitchell commented 3 months ago

Close based upon pull request #118