I am building a home-grown, mini DB2 table Editor. Here's how my DB2 Editor user-interface looks like -
I have two major problem areas -
1. For each of the Menu Items 1 - Browse, 2- Edit, I have different Panels. I am not aware of the standards followed while building Rexx-based ISPF Applications. I would like to know - should I use a separate Rexx module for each of the Menu Items, or should I have just one Rexx Driver Module?
2. I would the copy-right notice, to have a white background, red foreground color. I tried doing this with a Dynamic Area. However, I am not able to get the right combination. Please also suggest me a solution to this problem area.
Rexx Driver Code
/* REXX - Db2 Editor */
/* */
/* Author : Quasar Chunawala quasar.chunawala@igate.com */
/* */
/* REXX PROGRAM - ED000 */
/* PANELS - PAN000 */
/* */
/* VERSION 1.0 */
/* A Data Editor for Db2 on the zOS. */
/* (c) Copyright Quasar Chunawala, 2012 */
MAIN:
RPAD = COPIES(' ',20)
DAREA = '',
||'----+----+----+----+----+----+----+----+----+----+----+-'||RPAD,
||'|@(c) Copyright,2012 - DB2 Editor software program is \|'||RPAD,
||'|@an intellectual property owned by the publisher. \|'||RPAD,
||'|@Copying, distributing the software to other people \|'||RPAD,
||'|@or computers is strictly prohibited. \|'||RPAD,
||'|@Publisher - Quasar S Chunawala, Mumbai, India \|'||RPAD,
||'----+----+----+----+----+----+----+----+----+----+----+-'
ADDRESS ISPEXEC
"DISPLAY PANEL(PAN000)"
EXIT
/* */
/* Author : Quasar Chunawala quasar.chunawala@igate.com */
/* */
/* REXX PROGRAM - ED000 */
/* PANELS - PAN000 */
/* */
/* VERSION 1.0 */
/* A Data Editor for Db2 on the zOS. */
/* (c) Copyright Quasar Chunawala, 2012 */
MAIN:
RPAD = COPIES(' ',20)
DAREA = '',
||'----+----+----+----+----+----+----+----+----+----+----+-'||RPAD,
||'|@(c) Copyright,2012 - DB2 Editor software program is \|'||RPAD,
||'|@an intellectual property owned by the publisher. \|'||RPAD,
||'|@Copying, distributing the software to other people \|'||RPAD,
||'|@or computers is strictly prohibited. \|'||RPAD,
||'|@Publisher - Quasar S Chunawala, Mumbai, India \|'||RPAD,
||'----+----+----+----+----+----+----+----+----+----+----+-'
ADDRESS ISPEXEC
"DISPLAY PANEL(PAN000)"
EXIT
The Panel DTL Source Code
<!DOCTYPE DM SYSTEM>
<VARCLASS NAME=SUBSYSC TYPE='CHAR 04'>
<VARCLASS NAME=SQLIDC TYPE='CHAR 08'>
<VARLIST>
<VARDCL NAME=SUBSYS VARCLASS=SUBSYSC>
<VARDCL NAME=SQLID VARCLASS=SQLIDC>
</VARLIST>
<PANEL NAME=PAN000 MENU>
DB2 Editor ------------ Primary Option Menu ----------------
<CMDAREA>Option
<AREA WIDTH=50 DIR=HORIZ>
<REGION>
<SELFLD TYPE=MENU ENTWIDTH=06 SELWIDTH=45>
Enter a Selection Choice
<CHOICE CHECKVAR=XTEST1 MATCH=A SELCHAR='1'>BROWSE
<CHOICE CHECKVAR=XTEST1 MATCH=B SELCHAR='2'>EDIT
<CHOICE CHECKVAR=XTEST1 MATCH=C SELCHAR='3'>UTILITIES
<CHOICE CHECKVAR=XTEST1 MATCH=D SELCHAR=' 3.2'>
Create, Drop, Alter DB2 Objects
<CHOICE CHECKVAR=XTEST1 MATCH=E SELCHAR=' 3.3'>
Copy Rows between Tables
<CHOICE CHECKVAR=XTEST1 MATCH=F SELCHAR=' 3.4'>
Object List Processing
<CHOICE CHECKVAR=XTEST1 MATCH=G SELCHAR=' 3.6'>
Display, Grant and Revoke Priviledges
<CHOICE CHECKVAR=XTEST1 MATCH=H SELCHAR='6'>
EXTRACT AND LOAD TABLES
<CHOICE CHECKVAR=XTEST1 MATCH=T SELCHAR='T'>
TUTORIAL
<CHOICE CHECKVAR=XTEST1 MATCH=X SELCHAR='X'>
EXIT
</SELFLD>
</REGION>
</AREA>
<AREA WIDTH=26 DIR=HORIZ>
<DTAFLD DATAVAR=SUBSYS ENTWIDTH=04> DB2 System:
<DTAFLD DATAVAR=SQLID ENTWIDTH=08> DB2 SQL ID:
</AREA>
<AREA>
<DA NAME=DAREA DEPTH=07 SHADOW=SAREA>
<ATTR ATTRCHAR=# TYPE=CHAR COLOR=RED>
<ATTR ATTRCHAR=% TYPE=CHAR COLOR=GREEN>
<ATTR ATTRCHAR=\ TYPE=DATAOUT COLOR=BLUE>
<ATTR ATTRCHAR=_ TYPE=DATAIN COLOR=TURQ PADC='_'>
<ATTR ATTRCHAR=@ TYPE=DATAOUT COLOR=RED INTENS=HIGH>
<ATTR ATTRCHAR=! TYPE=CHAR COLOR=WHITE HILITE=REVERSE>
</DA>
</AREA>
</PANEL>
<VARCLASS NAME=SUBSYSC TYPE='CHAR 04'>
<VARCLASS NAME=SQLIDC TYPE='CHAR 08'>
<VARLIST>
<VARDCL NAME=SUBSYS VARCLASS=SUBSYSC>
<VARDCL NAME=SQLID VARCLASS=SQLIDC>
</VARLIST>
<PANEL NAME=PAN000 MENU>
DB2 Editor ------------ Primary Option Menu ----------------
<CMDAREA>Option
<AREA WIDTH=50 DIR=HORIZ>
<REGION>
<SELFLD TYPE=MENU ENTWIDTH=06 SELWIDTH=45>
Enter a Selection Choice
<CHOICE CHECKVAR=XTEST1 MATCH=A SELCHAR='1'>BROWSE
<CHOICE CHECKVAR=XTEST1 MATCH=B SELCHAR='2'>EDIT
<CHOICE CHECKVAR=XTEST1 MATCH=C SELCHAR='3'>UTILITIES
<CHOICE CHECKVAR=XTEST1 MATCH=D SELCHAR=' 3.2'>
Create, Drop, Alter DB2 Objects
<CHOICE CHECKVAR=XTEST1 MATCH=E SELCHAR=' 3.3'>
Copy Rows between Tables
<CHOICE CHECKVAR=XTEST1 MATCH=F SELCHAR=' 3.4'>
Object List Processing
<CHOICE CHECKVAR=XTEST1 MATCH=G SELCHAR=' 3.6'>
Display, Grant and Revoke Priviledges
<CHOICE CHECKVAR=XTEST1 MATCH=H SELCHAR='6'>
EXTRACT AND LOAD TABLES
<CHOICE CHECKVAR=XTEST1 MATCH=T SELCHAR='T'>
TUTORIAL
<CHOICE CHECKVAR=XTEST1 MATCH=X SELCHAR='X'>
EXIT
</SELFLD>
</REGION>
</AREA>
<AREA WIDTH=26 DIR=HORIZ>
<DTAFLD DATAVAR=SUBSYS ENTWIDTH=04> DB2 System:
<DTAFLD DATAVAR=SQLID ENTWIDTH=08> DB2 SQL ID:
</AREA>
<AREA>
<DA NAME=DAREA DEPTH=07 SHADOW=SAREA>
<ATTR ATTRCHAR=# TYPE=CHAR COLOR=RED>
<ATTR ATTRCHAR=% TYPE=CHAR COLOR=GREEN>
<ATTR ATTRCHAR=\ TYPE=DATAOUT COLOR=BLUE>
<ATTR ATTRCHAR=_ TYPE=DATAIN COLOR=TURQ PADC='_'>
<ATTR ATTRCHAR=@ TYPE=DATAOUT COLOR=RED INTENS=HIGH>
<ATTR ATTRCHAR=! TYPE=CHAR COLOR=WHITE HILITE=REVERSE>
</DA>
</AREA>
</PANEL>
Please provide some inputs in the above two areas.
Thanks and Regards,
Quasar