|
View previous topic :: View next topic
|
| Author |
Message |
amitava Warnings : 1 Active User

Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
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 |
|
 |
amitava Warnings : 1 Active User

Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
| 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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| 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 |
|
 |
amitava Warnings : 1 Active User

Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
 |
amitava Warnings : 1 Active User

Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
| 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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| What programming langauage are you writing your dialog in? |
|
| Back to top |
|
 |
amitava Warnings : 1 Active User

Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
| REXX |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
 |
amitava Warnings : 1 Active User

Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
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 |
|
 |
amitava Warnings : 1 Active User

Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
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 |
|
 |
|
|