Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ISPF Help needed to display the table data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Wed Mar 15, 2006 7:30 pm    Post subject: ISPF Help needed to display the table data
Reply with quote

Hi All,
Once again I have come for ur help. Can anyone please help me by giving some idea or some study material? Actually my scenario is - I have an ISPF table and I want to display all the datas present in that table. How is it possible? If possible, please send me some idea, sample code. Please help me. I am in trouble.
Back to top
View user's profile Send private message

amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Wed Mar 15, 2006 7:41 pm    Post subject:
Reply with quote

Hey Sorry I think u people will not be very clear abt my doubt. I want to show all the data stored in the table in a panel or skels. Please help me?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Mar 15, 2006 7:42 pm    Post subject: Re: ISPF Help needed to display the table data
Reply with quote

Do you know all of the variable names in the table, as well as their attributes (datatypes and lengths)? Or, are you just trying to "dump" the contents of a table which are basically unknown.
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Wed Mar 15, 2006 8:02 pm    Post subject:
Reply with quote

Ya I know the table attributes. The tables' attributes are of two ->
1. pgmname [i](char)[\i]
2. focmmem [i](char)[\i].
Now I want to display these two attributes in the panel. Its true that it can be done TBDISPL. But how? If possible. please give some sample code kind of thing or some study DOC, atleast where from I can understand how to use TBDISPL
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Mar 15, 2006 8:05 pm    Post subject: Re: ISPF Help needed to display the table data
Reply with quote

Did you go through the ISPF EDIT Models for your development language and retrieve the appropriate code for the TBDISPL service?

Beyond the EDIT Models, you might want to refer to the z/OS V1R7.0 ISPF Services Guide.
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Wed Mar 15, 2006 8:20 pm    Post subject:
Reply with quote

Nop I just know that by TBDISPL it can be done. But I dnt have any code sample for this TBDISPL. Cna u please send me the site?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Mar 15, 2006 8:21 pm    Post subject: Re: ISPF Help needed to display the table data
Reply with quote

What programming langauage are you writing your dialog in?
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Wed Mar 15, 2006 8:23 pm    Post subject:
Reply with quote

REXX
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Mar 15, 2006 8:33 pm    Post subject: Re: ISPF Help needed to display the table data
Reply with quote

Edit your REXX member:
Code:

Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 /* REXX */                                                             
****** **************************** Bottom of Data ****************************


Type MODEL on the command line, and place the A where you want to paste the selected model:
Code:

Command ===> model                                            Scroll ===> CSR 
****** ***************************** Top of Data ******************************
A00001 /* REXX */                                                             
****** **************************** Bottom of Data ****************************


Press ENTER. From the REXX Models, select option D2 TBDISPL:
Code:

                                  REXX Models                               
Option ===> D2                                                               
                                                                           
Enter number or service name.                                               
Enter END command to cancel MODEL command.                                 
                                                                           
Variables                 Workstation                 Library Access       
V1  VGET                  X1  FILESTAT                L0  LIBACC           
V2  VPUT                  X2  FILEXFER                                     
V3  VERASE                X3  WSCON                   Miscellaneous         
                          X4  WSDISCON                M1  SELECT           
Display                                               M2  CONTROL           
D1  DISPLAY                                           M3  BROWSE           
D2  TBDISPL               File Tailoring              M4  EDIT             
D3  SETMSG                F1  FTOPEN                  M5  LOG               
D4  PQUERY                F2  FTINCL                  M6  GETMSG           
D5  ADDPOP                F3  FTCLOSE                 M7  EDREC             
D6  REMPOP                F4  FTERASE                 M8  LIBDEF           
                                                      M9  LIST             
Tables                                                M10 VIEW             
T1  TABLES                                            M14 QLIBDEF           
                                                      M15 QBASELIB         
                                                      M16 DSINFO           
                                                      M17 QUERYENQ         


and you will retrieve the REXX TBDISPL Service code:

Code:

/* REXX */                                                             
  'TBDISPL' tablenam 'PANEL('panelnam') MSG('msg-id') CURSOR('field'), 
           CSRROW('row#') CSRPOS('pos#') AUTOSEL(YES),                 
           POSITION('crpname') ROWID('rowidname') MSGLOC('msgfield')'   
                                                                       
      tablenam   - Name of the table to be displayed on panel.         
      panelnam   - Name of the panel to be displayed.                   
      msg-id     - Optional, message to be displayed on the panel.     
      field      - Optional, identifies the column in which the         
                   cursor is to be placed.                             
      row#       - Optional, table row number of the screen line       
                   where the cursor is to be placed.                   
      pos#       - Optional, position in field to place cursor.         
                   The default is 1.                                   
      AUTOSEL    - Optional, choose one.                               
        YES      - Default, always return contents of row.             
        NO       - Return contents of row only if modified.             
      crpname    - Optional, the name of a variable in which the row   
                   number pointed to by the crp is to be stored.       
      rowidnam   - Optional, the name of a variable in which a number   
                   that uniquely identifies the row being accessed is to
                   be stored.                                           
      msgfield   - Optional, name of the field relative to which the   
                   message pop-up is positioned.                       
                                                                       
      EXAMPLE:  ADDRESS ISPEXEC                                         
                'TBDISPL  TABLEX   PANEL(NEWPNL) MSG(MSGER100),         
                         CURSOR('field1') CSRROW(7)'                   
                                                                       
  If rc ?= 0 Then                /* Return codes                      */
    Do                           /* 4  - The enter key or scroll      */
    End                          /*      command used; additional data*/
  Else                           /*      remains to be stored         */
                                 /* 8  - The end or return command was*/
                                 /*      entered.  If crp at top, no  */
                                 /*      lines modified               */
                                 /*    - Panel was generated from tags*/
                                 /*      and the EXIT command was     */
                                 /*      entered                      */
                                 /* 12 - Panel or message not found or*/
                                 /*      table not open               */
                                 /* 20 - Severe error                 */
**************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Thu Mar 16, 2006 9:06 am    Post subject:
Reply with quote

Thanx a lot man......... I really did not know of this thing. But by this one problem is solved -
I can design my REXX routine accordingly.
But what about my panel-design. Does it require anything extra other than normal panel design? Please Superk, please help me!!!!!!!!!!!
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Thu Mar 16, 2006 11:12 am    Post subject:
Reply with quote

Hey Superk,
Thanx a lot for ur help. However I have come up with the prob I had. Now I am able to show the table content on the panek using TBDISPL.
For group's benefit I am posting the sample code -
Code:

/* REXX */                             
address ispexec "control errors return"
address ispexec                         
ispplib = '[i]ISPPLIB_DSN[/i]'     
tbllib  = '[i]TABLE_DSN[/i]'       
flxref = '[i]TABLE_NAME[/i]'                     
                                       
"libdef ispplib dataset id('"ispplib"')"
"libdef isptlib dataset id('"tbllib"')"
"libdef isptabl dataset id('"tbllib"')"
                                       
call open_table                         
'tbdispl' T#FOCEM 'panel('repevsm')'   
say rc zerrlm                           
call close_table                       
call normal_end_para                   
return                                 
open_table:                             
   "tbclose" flxref                           
   "tbopen" flxref                           
   occ = rc                                   
   if(occ = 8) then say 'TABLE does not exist'
return                                       
close_Table:                                 
   "tbclose" flxref                           
return                                       
normal_end_para:                             
   "libdef isptlib"                           
   "libdef isptabl"                           
   "libdef ispplib"                           
return                                       


Panel Design - >
Code:

)attr                                                                   
  ? TYPE(TEXT)  INTENS(HIGH) JUST(LEFT) COLOR(YELLOW)                   
  _ TYPE(INPUT) INTENS(HIGH) CAPS(ON)   COLOR(GREEN) HILITE(USCORE)     
  ! COLOR(RED)  INTENS(HIGH) TYPE(TEXT)                                 
  @ COLOR(BLUE)  INTENS(HIGH) TYPE(OUTPUT)                             
)BODY                                                                   
+?                                                                     
%COMMAND ===>_ZCMD                                                    +%
?                       
?  Program Name                 Master Member
?  -----------------                 ------------------                               
)Model                                                                 
?_pgmname +                     _mstrmem                              +
)init                                                                   
)reinit                                                                 
)proc                                                                               
)END                                                                   


pgmname---|
mstrmem ---|----> These twos are the table attributes.


The Output will be like this -
[img]
Y090 Row 1 to 10 of 10
COMMAND ===>


FOCUS EXEC FOCUS MASTER
========== ============
ANBAGTRB ANBAGTNM,
ANBAGPRD ANBSGAGY,ANBAGYNM,
AGBDB004 AGBDB001,
AGBDB002 AGBDB001,
AGBDBSEC
AGBDBNEW AGBDB001,
AADMUAY1 AADMAGY,
AADMUATA AADMAGT,
AADMCTLD
AADAGYFL AADMAGY,
******************************* Bottom of data ********************************

[/img]
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Display upon console bipinpeter COBOL Programming 1 Thu Jun 22, 2017 12:35 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us