problem in displaying a temporory table with added data



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

problem in displaying a temporory table with added data

Postby malli419 » Tue Jun 26, 2012 3:49 pm

Hi everyone,

As per my requirement i displayed a panel (which is correction panel) with temporory table which contains several rows
Now user will corrects the rows on the panel, my duty is to validate the corrected rows in my master table and should display the non matching rows in another panel. So i created another temporory table for new panel and tried to add the rows which are not matching in my master table.when am trying to display the new panel it is giving only the last corrected row in all rows of new temporory table. Let me know if anyone know why it is happening?
malli419
 
Posts: 13
Joined: Mon Apr 16, 2012 2:25 pm
Has thanked: 4 times
Been thanked: 0 time

Re: problem in displaying a temporory table with added data

Postby expat » Tue Jun 26, 2012 4:34 pm

Do you issue a TBTOP instruction before displaying the table ?
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: problem in displaying a temporory table with added data

Postby malli419 » Tue Jun 26, 2012 4:43 pm

Thanks expat,

Ya i codded TBTOP

let me expliain with example,
if three rows are added to that table it is displaying 3 rows but the fault is three rows containes same data which is present in last row. see if three rows are added to the table t should display like
1
2
3

but am getting
3
3
3
malli419
 
Posts: 13
Joined: Mon Apr 16, 2012 2:25 pm
Has thanked: 4 times
Been thanked: 0 time

Re: problem in displaying a temporory table with added data

Postby Pedro » Tue Jun 26, 2012 7:20 pm

tried to add the rows

What does the trace show?

Show us your code.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: problem in displaying a temporory table with added data

Postby malli419 » Tue Jun 26, 2012 7:45 pm

IF  PFKEY = 'PF05' THEN               
DO  WHILE (ZTDSELS > 0);               
    EXEC SQL                           
    DECLARE CURPART CURSOR FOR         
    SELECT PART_NO FROM PRDT.TBPART04 
        WHERE PART_NO = :PART_N;       
    EXEC SQL                           
    OPEN CURPART;                                                                             
    EXEC SQL                           
    FETCH CURPART                     
    INTO :VPARTNO;     
IF SQLCODE = 0 THEN                                         
   DO;                                                       
      MAT_L = MATL_DOC;                                     
      EXEC SQL                                               
      UPDATE EPPS.EOGPREC                                   
      SET I_PART = :PART_N                                   
      WHERE I_MATL_DOCU = :MAT_L;                           
      IF SQLCODE = 0                                         
           THEN DO;                                         
                   CALL ISPLINK('SETMSG ', 'INVNA700');     
                                                             
                   IF  (ZTDSELS = 1) THEN                   
                        ZTDSELS = 0;                         
                   ELSE                                     
                       DO;                                   
                         EXEC SQL COMMIT;                   
                         CALL ISPLINK('TBDISPL', 'INVNT700');
                       END;                                 
                      END;                           
                                                     
         END;                                       
   ELSE IF (SQLCODE = 100) THEN DO;                 
                                                     
 /************************************************/ 
           U_PART = PART_N;                         
           CALL ISPLINK ('TBADD', 'INVNT701');       
           RETURN_CODE = PLIRETV;                   
                                                     
           IF RETURN_CODE > 4                       
           THEN DO;                                 
           ERR_FOUND = '1'B;                         
           RETURN;                                   
           END;                                     
           EXEC SQL COMMIT;                         
 /***********************************************/   
             CNT = CNT + 1;                                 
                                                             
             IF  (ZTDSELS = 1) THEN                         
                  ZTDSELS = 0;                               
             ELSE                                           
                DO;                                         
                  EXEC SQL COMMIT;                           
                  CALL ISPLINK('TBDISPL', 'INVNT700');       
                END;                                         
           END;                                             
    EXEC SQL                                                 
    CLOSE CURPART;                                           
   END; /* DO WHILE END */                                   
   IF CNT > 0 THEN                                           
     DO;                                                     
        CALL ISPLINK ('VPUT ', '(PART)','PROFILE');         
        CALL ISPLINK('TBTOP', 'INVNT701');                   
      EXEC SQL COMMIT;                                 
      CALL ISPLINK('TBDISPL', 'INVNT701', 'INVNP701'); 
      CALL P6000_ROUTE_PARA;                           
   END;                                                 
 END P4000_VALIDATE_PARTNO; /* END OF VALIDATE PARA */ 
                                                                       


In the above code if sql code = 100 the non matching parts in my master table should be added to temporory table INVNT701

Thanks in advance
malli419
 
Posts: 13
Joined: Mon Apr 16, 2012 2:25 pm
Has thanked: 4 times
Been thanked: 0 time

Re: problem in displaying a temporory table with added data

Postby Akatsukami » Tue Jun 26, 2012 8:10 pm

You did VDEFINE the dialog variables corresponding to the ISPF table columns in your PL/I program, yes?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day

These users thanked the author Akatsukami for the post:
malli419 (Fri Jun 29, 2012 12:43 pm)
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: problem in displaying a temporory table with added data

Postby malli419 » Tue Jun 26, 2012 8:18 pm

yes i defined them
malli419
 
Posts: 13
Joined: Mon Apr 16, 2012 2:25 pm
Has thanked: 4 times
Been thanked: 0 time

Re: problem in displaying a temporory table with added data

Postby Pedro » Wed Jun 27, 2012 3:39 am

Does the panel )MODEL statement use the same variable names as the VDEFINE? Same as the TBCREATE?
Pedro Vera

These users thanked the author Pedro for the post:
malli419 (Wed Jun 27, 2012 12:31 pm)
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: problem in displaying a temporory table with added data

Postby Pedro » Wed Jun 27, 2012 3:46 am

Of course, you know that your PLI program does not really do much of the stuff you mentioned in your original problem description.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: problem in displaying a temporory table with added data

Postby NicC » Wed Jun 27, 2012 12:07 pm

Your description is also confusing as you have made no distinction between ISPF tables and DB2 tables in your post. Is your temporary table the ISPF table (and only ISPF table)?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

These users thanked the author NicC for the post:
malli419 (Fri Jun 29, 2012 12:43 pm)
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post