Page 1 of 1

ISPF tables

PostPosted: Thu Oct 02, 2008 8:48 pm
by vinu78
Hi,

I just want to create a permanent table using ISPF and add some data to it.
I had created the lib <userid>.TEST.ISPTLIB for the tables.
Even after executing the below query, I am not able to create any ISPF tables in the respective library.
Whether my approach is right. Plz help

/* REXX */
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('CXN1.TEST.ISPPLIB')"
"LIBDEF ISPTLIB DATASET ID('CXN1.TEST.ISPTLIB')"
"ADDPOP"
ZWINTTL = "TRANFORMATION OF JCLS"
"DISPLAY PANEL(PNLPRC)"
"VGET VAR1"
"REMPOP"
"TBCREATE TELBOOK KEYS(TABKEY) WRITE"
"TBSAVE TELBOOK"

After running the above REXX program in the command prompt, the ISPF table is not created.

Thanks
Vinu

Re: ISPF tables

PostPosted: Thu Oct 02, 2008 10:30 pm
by vinu78
Hi,

I am able to create the table in ISPF but not able to display the rows onto the CLIST panel from the table.
The error is given as "Table doesn't exist"

Code to create EMP table and to add data to it/* REXX */
ADDRESS ISPEXEC
"LIBDEF ISPTABL DATASET ID('CFN1.TEST.ISPTABL')"
"TBCREATE EMP KEYS(EMPID) NAMES(NAME) WRITE SHARE"
EMPID = 1
NAME = CHIDU
"TBADD EMP ORDER"
"TBCLOSE EMP"
EXIT

Code to display the data from table
/* REXX */
ADDRESS ISPEXEC
"LIBDEF ISPTLIB DATASET ID('CFN1.TEST.ISPTLIB')"
"TBOPEN EMP NOWRITE SHARE"
SAY RC
EXIT

Could anyone please help me to figure this out.

Thanks
Vinu

Re: ISPF tables

PostPosted: Fri Oct 03, 2008 1:56 am
by Bill Dennis
You show two different datasets.

CFN1.TEST.ISPTLIB and CFN1.TEST.ISPTABL

Are you creating in one and trying to read from the other? Use only one.

Re: ISPF tables

PostPosted: Fri Oct 03, 2008 2:08 am
by vinu78
Hi Bill,

I got the solution now.
The lib definition of both ISPTABL and ISPTLIB should be the same i.e,
LIBDEF ISPTABL DATASET ID('CFN1.TEST.ISPTLIB')"
LIBDEF ISPTLIB DATASET ID('CFN1.TEST.ISPTLIB')"

So that when we first create a table and add rows to it, a table entry will be put in the lib ''CFN1.TEST.ISPTABL" and we will be able to retrieve the data from it.

Earlier I was using diff lib for ISPTABL (creating table) and searching diff lib for the created table.
Note: The rule here is use same library for both ISPTABL (table creation / adding data) and for ISPTLIB (retrieving the data from the table).

Thanks
Vinu