A home-grown mini Db2 Editor



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

A home-grown mini Db2 Editor

Postby Quasar » Sat Aug 18, 2012 11:34 am

Hi friends,

I am building a home-grown, mini DB2 table Editor. Here's how my DB2 Editor user-interface looks like -

Image

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                     


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>   


Please provide some inputs in the above two areas.

Thanks and Regards,
Quasar
Quasar Chunawala,
Software Engineer, Lives at Borivali, Mumbai
User avatar
Quasar
 
Posts: 102
Joined: Wed Nov 10, 2010 7:11 pm
Location: Borivali, Mumbai
Has thanked: 13 times
Been thanked: 2 times

Re: A home-grown mini Db2 Editor

Postby NicC » Sat Aug 18, 2012 4:52 pm

How you code your programs is entirely up to you. Just be consistent within yourself.
As for colours just define different attribute characters with the required colours. It is all in the manual, I believe.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: A home-grown mini Db2 Editor

Postby Quasar » Sun Aug 19, 2012 11:23 am

Hi Nic, I have tried reading about the different ISPF Services, to display a panel - DISPLAY, TBDISPL and SELECT from the manuals. I am still a little confused between, when should I use the DISPLAY Service or the SELECT Service. Why do we have these two different services in the first place?
Quasar Chunawala,
Software Engineer, Lives at Borivali, Mumbai
User avatar
Quasar
 
Posts: 102
Joined: Wed Nov 10, 2010 7:11 pm
Location: Borivali, Mumbai
Has thanked: 13 times
Been thanked: 2 times

Re: A home-grown mini Db2 Editor

Postby NicC » Sun Aug 19, 2012 12:11 pm

You know you should ask only one question per topic - I let your first post go with 2 but to introduce a third is going too far.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

These users thanked the author NicC for the post:
Quasar (Sun Aug 19, 2012 12:51 pm)
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: A home-grown mini Db2 Editor

Postby Quasar » Sun Aug 19, 2012 12:47 pm

Okay, I'll start a new thread. Apologise for boo-boo'ing the norms.
Quasar Chunawala,
Software Engineer, Lives at Borivali, Mumbai
User avatar
Quasar
 
Posts: 102
Joined: Wed Nov 10, 2010 7:11 pm
Location: Borivali, Mumbai
Has thanked: 13 times
Been thanked: 2 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post