Page 2 of 2

Re: problem in displaying a temporory table with added data

PostPosted: Wed Jun 27, 2012 12:29 pm
by malli419
Thanks NicC,

Yes the temporary table is ispf table it is INVNT701.

Actually in first panel i have some rows in one temporory table INVNT700. User can correct part numbers in that panel.
Once the corrects (for exp) 5 parts i need to check those 5 parts in my DB2 table. Here if the parts found in DB2 table i will update them. if not i need to send those parts to another panel and display them using another temporory temble which is INVNT701.
So as i siad in example if 5 parts are corrected by the user suppose 2 parts are not found in DB2 table i need to display those 2 parts in another panel. My code is displaying 2 parts but the 2 parts are same the 2nd part is displayed in 2 rows of INVNT701.........

Hope it is meaningful.........

Thanks in Advance.

Re: problem in displaying a temporory table with added data

PostPosted: Wed Jun 27, 2012 2:05 pm
by malli419
Ya Pedro the names are same in vdefine and panel(MODEL)

Re: problem in displaying a temporory table with added data

PostPosted: Wed Jun 27, 2012 7:01 pm
by Pedro
the names are same in vdefine and panel(MODEL)

and TBCREATE?

Re: problem in displaying a temporory table with added data

PostPosted: Wed Jun 27, 2012 7:08 pm
by malli419
Ya pedro it is same even in TBCERATE...the table is displaying the rows but the last row is repeated in all rows....

Thanks in advance

Re: problem in displaying a temporory table with added data

PostPosted: Wed Jun 27, 2012 9:25 pm
by Pedro
My diagnosis with limited information is that not all of the parts match correctly. Can you show us the actual statement from the )MODEL section. And show us the actual TBCREATE statement.

Also, can you print out PART_NO, U_PART, PART_N, I_PART during each iteration? Are you sure DB2 is returning different data for each iteration. BTW, did you know underscores are not valid in ISPF variable names. Shows us the actual VDEFINE statements also. What return codes do you get from VDEFINE?

Re: problem in displaying a temporory table with added data

PostPosted: Thu Jun 28, 2012 2:50 pm
by malli419
Hi Pedro,

This is my )MODEL which containes only one field
)MODEL         
+   |PART     


VDEFINE stament is
CALL ISPLINK ('VDEFINE','(PART    )',U_PART         ,'CHAR ',LEN10);


here u_part is program variable

My TBCREATE is
CALL ISPLINK                                                 
   ('TBCREATE', 'INVNT701',' ', PART, 'NOWRITE', 'REPLACE'); 


and coming to DB2 yes it is returning different data in each iteration but when displaying my table i.e.,INVNT701 in eah and every row is shows the last value i mean to say the last retrived part is displayed in all rows............

Thanks..

Re: problem in displaying a temporory table with added data

PostPosted: Thu Jun 28, 2012 7:05 pm
by Pedro
Is PART a valid PLI program variable?

CALL ISPLINK                                                 
   ('TBCREATE', 'INVNT701',' ', PART, 'NOWRITE', 'REPLACE');


TBCREATE is expecting the names of the table columns. But since 'PART' is not quoted, the compiler will provide the value of the PART variable. ISPLINK will never see that you wrote PART as part of the call.

If PART= 'PART', then you will get what you want, but if it is not, then you get the results you are seeing.

And that is why we ask for the details of all of the calls.

Re: problem in displaying a temporory table with added data

PostPosted: Thu Jun 28, 2012 8:43 pm
by malli419
Thanks Pedro, i have quoted the part as 'PART' in my TBCREATE now it is working fine and am able to display my temporory table as per the requirement..............

am new to ispf panel still in learning stage anyway thanks a lot for ur intrest shown in my problem

thanks,
mallikarjun