Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem of clearing ISPF table entries

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
sabarish

New User


Joined: 03 Apr 2009
Posts: 3
Location: Bangalore

PostPosted: Sat Apr 04, 2009 10:09 am    Post subject: Problem of clearing ISPF table entries
Reply with quote

Hi

I am having a problem of the entries being shown on a panel from a ISPF
table sometimes showing multiple entries wrt actual entries in a file during the
first time of invoking the panel. I am reading from a file and displaying in a
panel using ISPF tables.

The problem is related to some memory clearing if i am correct.

I am reading from a file whose contents are as follows:

SIA753WR24SWRWD
HOR782DRUIJ0ESD
HOR811CQ20W0R0D
SIA782UIOZIWER
HOR77 JO83989E
UTA77 KLUJSERID
UIX77 RWRWRWRID
PNR753IOWRIWRID

Whichever record is not having 'D' at the end should be displayed in the panel.
So as per that only record starting with SIA782 and HOR77 should be
displayed.
But when i display the panel, it is displaying

record starting with SIA782
record starting with HOR77
record starting with HOR782

Opt Build Name Build No
--- -------------- -------------
_ SIA782 UIOZIWER
_ HOR77 JO83989E
_ HOR782 DRUIJ0ES

The record with HOR782 should not appear in the panel.In the previous test i
had used HOR782 , may be that is why it is showing in the table. Is it possible
to clear all the rows in a table? How do we know the no. of rows in a table at
a particular time?
Code:

/****REXX*****/
MEDSNHLQ='SKANNON.UT753SP'
MYEXEC=MEDSNHLQ||'.TEST.EXEC'
'ISPEXEC LIBDEF ISPPLIB DATASET ID('''MYEXEC''')'
ADDRESS TSO
/*"ISPEXEC TBCREATE MAXTB NAMES(T0 T1 T2 T3) "|| ,
           ",NOWRITE, SHARE " */
"ISPEXEC TBCREATE MAXTB NAMES(T0 T2 T3) "|| ,
           "KEYS(T1) ,NOWRITE, SHARE "

INSEQ  = "'"||SKANNON.NR.TEST.BLDLST||"'"
SEL = ''
CALL,POP_TBL

SAY 'BEFORE TBTOP'
'ISPEXEC TBTOP MAXTB '

DO WHILE ENDRC <= 4

 ' ISPEXEC TBVCLEAR MAXTB'
  CALL TBDISPL_BLDDTL

/*'ISPEXEC TBEND MAXTB ' */
  SAY 'BEFORE ZTDSEL'
  IF ZTDSEL=0 | RC>4 THEN
    DO
     ENDRC=RC
     say 'NO BUILD SELECTED'
     ' ISPEXEC TBVCLEAR MAXTB'
     'ISPEXEC TBEND MAXTB '
     'ISPEXEC DISPLAY PANEL(SBLBDSP)'
    SAY 'DISP PFKEY' PFKEY
    IF PFKEY = 'PF03' THEN RETURN
   END
 ELSE IF T0 = 'S' THEN
   DO
   SEL = 'X'
    CALL BLD_MEMLIST
    IF ZTDSEL=0 | RC>4 THEN
      DO
       ENDRC=RC
       'ISPEXEC TBEND MAXTB '
      END
   END
 ELSE IF T0 = 'A' THEN
  DO
   SEL = 'X'
   SAY 'BEFORE INSRT'
    CALL INSRT_REC
    ENDRC = 8
  END
 ELSE IF T0 = 'D' THEN
DO
*"ISPEXEC TBCREATE XTB1 NAMES(T0 T1 T2),NOWRITE, SHARE"
ROWCNT2=ZTDSELS
DO IX1=1 TO ROWCNT2
  VTBA1.IX1.1=T0
  VTBA1.IX1.2=T1
  VTBA1.IX1.3=T2
  'ISPEXEC CONTROL NONDISPL'
END
DO IX1=1 TO ROWCNT2
  OPTTYPE=VTBA.IX1.1
  BUINAM1 =VTBA.IX1.2
END */
   SEL = 'X'
   BUINAM1 = T1
    SAY 'BUINAM1' BUINAM1
     CALL DLT_REC
 /* "ISPEXEC TBCREATE MAXTB NAMES(T0 T1 T2 T3) "|| ,
           ",NOWRITE, SHARE " */
     ENDRC = 8
/*'ISPEXEC TBTOP MAXTB ' */
 END
END
SAY 'VALUE OF SEL' SEL
IF SEL = 'X' THEN
 DO
  SAY 'BEFORE POP'
/*'ISPEXEC TBEND MAXTB ' */
  CALL POP_TBL
  SAY 'AFTER POP_TBL'
  CALL TBDISPL_BLDDTL
  'ISPEXEC DISPLAY PANEL(SBLBDSP)'
  SAY 'SECON DISP' PFKEY
  IF PFKEY = 'PF03' THEN RETURN
 END
RETURN

TBDISPL_BLDDTL:
     SAY 'WITHIN DISPL'

     'ISPEXEC TBDISPL MAXTB PANEL(SBLBDSP)'
      SAY 'AFTER TBDISPL'

RETURN


TBADD_BLDDTL:
     SAY 'WITHIN BLDDTLADD :' T1
     SAY 'WITHIN BLDDTLADD1:' T2
     SAY 'WITHIN BLDDTLADD2:' T3
     "ISPEXEC TBADD MAXTB"
RETURN


BLD_MEMLIST:

/*CALL THE REXX ROUTINE FOR COPYING THE SQLSCRIPT AND CHANGING TBLOWNER
  THEN CALL THE ROUTINE FOR BRINGING UP THE SQL JOB'
*/
SAY 'WITHIN BLD_MEMLIST'
SAY 'T0:' T0
SAY 'T1:' T1
SAY 'T2:' T2
 MYDSNHLQ = DSNHL
 TBOWNER = TBOWN
 SAY 'High level: ' MYDSNHLQ
 SAY 'TB Owner : ' TBOWNER
 IF MYDSNHLQ = '' | TBOWNER = '' THEN
DO
  SAY 'DSNHLQ and TBOWNER cannot be empty'
  RETURN
END
ISPEXEC VPUT (MYDSNHLQ)'
ISPEXEC VPUT (TBOWNER)'
IF ZTDSELS = 0 THEN
DO
 SAY 'NO BUILD SELECTED'
 'ISPEXEC DISPLAY PANEL(SBLBDSP)'
 SAY 'THIRD DISP' PFKEY
 IF PFKEY = 'PF03' THEN RETURN
END
IF ZTDSELS > 1 THEN
O
 SAY 'ONLY ONE CAN BE SELECTED'
 'ISPEXEC DISPLAY PANEL(SBLBDSP)'
 SAY 'FOURTH DISP' PFKEY
  IF PFKEY = 'PF03' THEN RETURN
END
/* "ISPEXEC TBEND XTB "
 "ISPEXEC TBCREATE XTB NAMES(T0 T1 T2),NOWRITE, SHARE"
 ROWCNT=ZTDSELS
 DO IX=1 TO ROWCNT
   VTBA.IX.1=T0
   VTBA.IX.2=T1
   VTBA.IX.3=T2
   'ISPEXEC CONTROL NONDISPL'
   'ISPEXEC TBDISPL MAXTB'
 END
 DO IX=1 TO ROWCNT
   OPTTYPE=VTBA.IX.1
   BUINAM =VTBA.IX.2
 END */
 BUINAM = T1
ADDRESS ISPEXEC
'ISPEXEC VPUT (BUINAM)'
CALL BDSQCOPY
CALL SBLJBBDS
RETURN
INSRT_REC:
  NBLD = SUBSTR(T1,1,6)||SUBSTR(T2,1,8)
  SAY 'NBLD' NBLD
"ALLOC FI(INSEQ)  DA("||INSEQ||") MOD"
push NBLD
 "EXECIO 1 DISKW INSEQ"
'EXECIO 0 DISKW INSEQ (FINIS '
'FREE FI(INSEQ)'
RETURN
DLT_REC:
SAY 'WITHIN DLT_REC'
"ALLOC FI(INSEQ)  DA("||INSEQ||") OLD"
LCTR=0
EOF=0
DO WHILE EOF=0
say "LCTR " LCTR
LCTR = LCTR + 1
"EXECIO 1 DISKR INSEQ "
EOF=RC
LINE1 = ''
PULL LINE1
SAY 'BUINAM1 BEFORE CHECK' BUINAM1
SAY 'SUBSTR LINE1' SUBSTR(LINE1,1,6)
IF BUINAM1 = SUBSTR(LINE1,1,6) THEN
 LEAVE
ELSE
 ITERATE
END
SAY 'BEFORE LCTR ' LCTR
"EXECIO 1 DISKRU INSEQ " LCTR
PULL LINE
NBLD1 = SUBSTR(T1,1,6)||SUBSTR(T2,1,8)||'D'
PUSH NBLD1
"EXECIO 1 DISKW INSEQ (FINIS "
"FREE F(INSEQ)"
' ISPEXEC TBDELETE MAXTB'
RETURN
POP_TBL:
DROP X.
TRKLINE = ''
"ALLOC FI(INSEQ)  DA("||INSEQ||") SHR REUS"
'EXECIO 1 DISKR INSEQ(STEM X. '
EOF=RC
' ISPEXEC TBVCLEAR MAXTB'
DO WHILE EOF=0
  SAY 'WITHIN LOOP'
  PARSE VAR X.1 TRKLINE
  TRKLINE=STRIP(TRKLINE)
  T0='_'
  T1=SUBSTR(TRKLINE,1,6)
 T2=SUBSTR(TRKLINE,7,8)
 T3=SUBSTR(TRKLINE,15,1)
  say 'ALL T1' T1
  say 'ALL T2' T2
  say 'ALL T3' T3
 IF T3<>'D' THEN
 DO
  say 'T1' T1
  say 'T2' T2
  say 'T3' T3
  CALL TBADD_BLDDTL
 END
"EXECIO 1 DISKR INSEQ (STEM X."
 EOF=RC
 T0 = ''
 T1 = ''
 T2 = ''
END
'EXECIO 0 DISKW INSEQ (FINIS '
'FREE FI(INSEQ)'
RETURN
Back to top
View user's profile Send private message

Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2088
Location: Silicon Valley

PostPosted: Sat Apr 04, 2009 8:54 pm    Post subject: Reply to: Problme of clearing ISPF table entries
Reply with quote

The main problem with your program is that you have no comments to explain what it is supposed to do.

You may also want to add some blank lines to separate some code segments from others.

Another problem is that your sample program is too long for a casual viewer to look at and understand. You should simplify your code to demonstrate the problem with minimum distraction.

It is not clear what you are trying to do, but it sounds like you want to occasionally end the table and recreate it. So you need TBCREATE and TBEND. It might be there, but the program is not structured so that we can tell if they are being done at the correct times.
Back to top
View user's profile Send private message
sabarish

New User


Joined: 03 Apr 2009
Posts: 3
Location: Bangalore

PostPosted: Mon Apr 06, 2009 12:11 pm    Post subject: Reply to: Problem of clearing ISPF table entries
Reply with quote

Hi Pedro

ok. Sorry for that. I am reattaching the code with some comments and blank lines.


The aim of this code is to

Read from a file whose contents are as follows:

SIA753WR24SWRWD
HOR782DRUIJ0ESD
HOR811CQ20W0R0D
SIA782UIOZIWER
HOR77 JO83989E
UTA77 KLUJSERID
UIX77 RWRWRWRID
PNR753IOWRIWRID


- records not having 'D' at the end should be displayed in the panel.
So as per that only record starting with SIA782 and HOR77 should be
displayed.

But when i display the panel, it is displaying

record starting with SIA782
record starting with HOR77
record starting with HOR782

Opt Build Name Build No
--- -------------- -------------
_ SIA782 UIOZIWER
_ HOR77 JO83989E
_ HOR782 DRUIJ0ES

The record with HOR782 should not appear in the panel.In the previous test i had used HOR782 , may be that is why it is showing in the table. Is it possible to clear all the rows in a table? How do we know the no. of rows in a table at a particular time?

thanks in advance
Sabarish
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2088
Location: Silicon Valley

PostPosted: Mon Apr 06, 2009 9:15 pm    Post subject: Reply to: Problem of clearing ISPF table entries
Reply with quote

Quote:
It is not clear what you are trying to do, but it sounds like you want to occasionally end the table and recreate it. So you need TBCREATE and TBEND. It might be there, but the program is not structured so that we can tell if they are being done at the correct times.


Was I not clear? You need to issue pairs of TBCREATE an TBEND occasionally.

Look in the ISPF Services manual. All of the table related services begin with TB. There -is- one that will return to you the number of rows in the table.
Back to top
View user's profile Send private message
sabarish

New User


Joined: 03 Apr 2009
Posts: 3
Location: Bangalore

PostPosted: Tue Apr 07, 2009 12:13 pm    Post subject: Reply to: Problem of clearing ISPF table entries
Reply with quote

Hi Pedro

Thanks. I got it .The TBQUERY service gives the no. of rows in the table.
Also i will check the TBCREATE and TBEND stuff.

Sabarish
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us