SHADOW areas in ISPF TUTORIAL panels



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

SHADOW areas in ISPF TUTORIAL panels

Postby Steve Coalbran » Tue May 24, 2011 6:07 pm

I am trying to build a TUTORIAL panel so that it can display contiguous attribute byte changes
(this is because it describes its owner application which uses this feature).
To do this I clearly need to use SHADOW variables.
So I first tried to have a SCROLLable AREA within which there were non-scrollable DYNAMIC AREAs.
ISPF did not seem to allow this (or I did something wrong that several permutations and cobminations failed to identify).
Next I tried assigning the values for a dynamic area and its shadow variable.
This looked messy so I wrote a REXX exit to load this from the panel member itself below the )END marker.
Like this...
(Note: the excluded lines are either repetitions of the previous couples ,in the case of the panels, or in the REXX, hidden coding to trap the active displayed panel dsn {not that it's that difficult, just lengthy} !)
ISPPLIB Member: SPLUG
)ATTR DEFAULT(%+_)                                                      
)BODY                                                                   
%---------------------- ANY OLD ENTRY PANEL  ---------------------------
%COMMAND ===>_ZCMD                                                      
%                                                                       
+PANEL STUFF...                                                         
+                                                                       
+Press PF1 for HELP                                                     
)INIT                                                                   
 .HELP = SPLUGH                                                         
 &PANEL = SPLUG                                                         
 *REXX(*,UDATA,USHAD,PANEL,(DYNHELP))                                   
 VPUT(UDATA,USHAD)                                                      
)END                                                                    
)DATA                                                                   
000001 TEST FOR SCROLLABLE TUTORIAL PANEL TEXT.                         
000002 CONTIGUOUS COLOR TEST                                            
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 48 Line(s) not Displayed
)SHAD                                                                   
GGGGGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW                         
GGGGGG RYGTBPWRYG TBPWR YGTB                                            
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 50 Line(s) not Displayed
)EXIT 
                                                                  

This loads the DATA and SHADow variables using the )DATA and )SHADow panel sections.

SYSEXEC Member: DYNHELP
pandd = "PAN"RIGHT(TIME("S"),5,0)                                      
ADDRESS TSO "ALLOC DD("pandd") DS('"INDSM("ISPPLIB",panel)"')",        
                  "SHR REUSE"                                          
ADDRESS TSO "EXECIO * DISKR "pandd" (STEM PAN. FINIS"                  
PARSE VALUE "" WITH udata ushad                                        
DO i = 1 TO pan.0                                                      
   PARSE UPPER VAR pan.i 1 qsd 2 qsn ' ' .                             
   IF( qsd=")" )THEN 
      PARSE VALUE 0 WITH 1 indata 1 inshad              
   IF( qsd=")" & qsn="EXIT" )THEN LEAVE                                
   IF( indata )THEN udata = udata!!LEFT(pan.i,80)                      
   IF( inshad )THEN ushad = ushad!!LEFT(pan.i,80)                      
   IF( qsd=")" & qsn="DATA" )THEN                                      
      PARSE VALUE 1 0 WITH indata inshad                               
   IF( qsd=")" & ABBREV("SHADOW",qsn,4) )THEN                          
      PARSE VALUE 0 1 WITH indata inshad                               
END                                                                    
ADDRESS TSO "FREE DD("pandd")"                                
SIGNAL ENDREXX                                                         
/* get the current panel location in the concatenation --------------*/
INDSM:   Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 
ARG qdd,qmn                                                            
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 19 Line(s) not Displayed
               IF( mn=qmn )THEN RETURN ds"("mn")"                      
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  7 Line(s) not Displayed
ENDREXX:
                                                               

ISPPLIB Member: SPLUGH
)ATTR DEFAULT(%+_)                                                      
 ½ TYPE(TEXT) COLOR(GREEN)                                              
 |  AREA(DYNAMIC) SCROLL(ON) EXTEND(OFF)                                
 R  TYPE(CHAR) COLOR(RED)                                               
 G  TYPE(CHAR) COLOR(GREEN)                                             
 B  TYPE(CHAR) COLOR(BLUE)                                              
 W  TYPE(CHAR) COLOR(WHITE)                                             
 P  TYPE(CHAR) COLOR(PINK)                                              
 Y  TYPE(CHAR) COLOR(YELLOW)                                            
 T  TYPE(CHAR) COLOR(TURQ)                                              
)BODY  EXPAND(//)                                                       
%---------------------- ANY OLD ENTRY PANEL TUTORIAL -------------------
+Command ===>_ZCMD                                                      
|UDATA,USHAD/ /                                                         
|/ /                                                                    
-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 14 Line(s) not Displayed
|/ /                                                                    
½                           (continued on next page)                    
)INIT                                                                   
 VGET(UDATA,USHAD)                                                      
)END

Any serious suggestions welcomed. Especially any from Perth! :lol:
Steve
User avatar
Steve Coalbran
 
Posts: 102
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: SHADOW areas in ISPF TUTORIAL panels

 

Re: SHADOW areas in ISPF TUTORIAL panels

Postby Steve Coalbran » Tue May 24, 2011 6:46 pm

Steve Coalbran wrote:this should have been posted in "TSO & ISPF"
Steve
User avatar
Steve Coalbran
 
Posts: 102
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: SHADOW areas in ISPF TUTORIAL panels

Postby Steve Coalbran » Thu May 26, 2011 1:19 pm

OK - fixed it ! :D

The base panel still defines the dynamic area from the )DATA and )SHAD sections...
(I will extend this functionality to add a name: )DATA AREA1,)SHAD AREA1 allowing for multiple dynamic areas ?)

)ATTR DEFAULT(%+_)
)BODY
%---------------------- ANY OLD ENTRY PANEL  ---------------------------
%COMMAND ===>_ZCMD
%
+PANEL STUFF...
+
+Press PF1 for HELP
)INIT
 .HELP = SPLUG2H
 &PANEL = SPLUG2
 *REXX(*,UDYNA,USHAD,PANEL,(DYNHELP))
 VPUT(UDYNA,USHAD)
)END
)DYNA
000001 TEST FOR SCROLLABLE TUTORIAL PANEL TEXT.
000002 CONTIGUOUS COLOR TEST
000003 TEST FOR SCROLLABLE TUTORIAL PANEL TEXT.
000004 CONTIGUOUS COLOR TEST
000005 TEST FOR SCROLLABLE TUTORIAL PANEL TEXT.
000006 CONTIGUOUS COLOR TEST
)SHAD
GGGGGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW
GGGGGG RYGTBPWRYG TBPWR YGTB
GGGGGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW
GGGGGG RYGTBPWRYG TBPWR YGTB
GGGGGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW
GGGGGG RYGTBPWRYG TBPWR YGTB
)EXIT


...using the *REXX DYNHELP routine...
TRACE "N"
pandd = "PAN"RIGHT(TIME("S"),5,0)
ADDRESS TSO "ALLOC DD("pandd") DS('"INDSM("ISPPLIB",panel)"')",
                  "SHR REUSE"
ADDRESS TSO "EXECIO * DISKR "pandd" (STEM PAN. FINIS"
PARSE VALUE "" WITH udyna ushad
DO i = 1 TO pan.0
   PARSE UPPER VAR pan.i 1 qsd 2 qsn ' ' .
   IF( qsd=")" )THEN PARSE VALUE 0 WITH 1 indyna 1 inshad
   IF( qsd=")" & qsn="EXIT" )THEN LEAVE
   IF( indyna )THEN udyna = udyna!!LEFT(pan.i,80)
   IF( inshad )THEN ushad = ushad!!LEFT(pan.i,80)
   IF( qsd=")" & ABBREV("DYNAMIC",qsn,4) )THEN
      PARSE VALUE 1 0 WITH indyna inshad
   IF( qsd=")" & ABBREV("SHADOW",qsn,4) )THEN
      PARSE VALUE 0 1 WITH indyna inshad
END
ADDRESS TSO "FREE DD("pandd")"   /*MOVE*/
SIGNAL ENDREXX
/*===================================================================*/
/* get the current panel location in the concatenation               */
/* (only works if in ISPPLIB not with LIBDEF (yet!)                  */
/*===================================================================*/
INDSM:
ARG qdd,qmn
------------------------------------------------------- HIDDEN LINES --
               IF( mn=qmn )THEN RETURN ds"("mn")"
------------------------------------------------------- HIDDEN LINES --
ENDREXX:


The HELP panel is defined like this ...
)ATTR DEFAULT(%+_)
 Â½  TYPE(TEXT) COLOR(GREEN)
 01 AREA(SCRL) EXTEND(ON)
 |  AREA(DYNAMIC) SCROLL(OFF) EXTEND(OFF)
 R  TYPE(CHAR) COLOR(RED)
 G  TYPE(CHAR) COLOR(GREEN)
 B  TYPE(CHAR) COLOR(BLUE)
 W  TYPE(CHAR) COLOR(WHITE)
 P  TYPE(CHAR) COLOR(PINK)
 Y  TYPE(CHAR) COLOR(YELLOW)
 T  TYPE(CHAR) COLOR(TURQ)
)BODY  EXPAND(//)
%---------------------- ANY OLD ENTRY PANEL TUTORIAL -------------------
+Command ===>_ZCMD
 HELPER
)AREA HELPER DEPTH(20)
+Help text 1
|UDYNA,USHAD/ /
|/ /
|/ /
|/ /
|/ /
|/ /
+Help text 2
...
+Help text 30
½                           (continued on next page)
)INIT
 VGET(UDYNA,USHAD)
)END


When SPLUG is executed it displays as...
Image

When HELP is pressed from here the TUTORIAL panel is displayed like this...
Image
Steve
User avatar
Steve Coalbran
 
Posts: 102
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: SHADOW areas in ISPF TUTORIAL panels

Postby Steve Coalbran » Thu May 26, 2011 1:34 pm

Ooops! - changed it halfway there - any refs to )DATA should now be )DYNA !!! :D
Steve
User avatar
Steve Coalbran
 
Posts: 102
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: SHADOW areas in ISPF TUTORIAL panels

Postby breyre » Wed Dec 07, 2011 7:33 pm

Hello,
First of all thank you Steve for this very usefull example.
I am trying to create panels with continuous attribute color change.
So, to get a little more familiar with this feature, i create panels , just
the same as shown above, but i get an error on the help panel.
Could someone help me to find the error in the help panel please,
get message :

An )AREA section is defined without a section defined in the panel )BODY section.
Panel line where error was detected:
)AREA HELPER DEPTH(20)

I could not get i work, perhaps something is missing in this example??
Thank you

Didier
breyre
 
Posts: 1
Joined: Wed Dec 07, 2011 7:08 pm
Has thanked: 0 time
Been thanked: 0 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post