Need information about VGET



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

Need information about VGET

Postby surime72 » Fri Jun 08, 2012 10:24 am

hi guys,

VGET (ABC) PROFILE,

for example ihad screen in that abc fields has some values ex ABC
------
123
456
789
.
.
.
vvc
while i was using VGET (ABC) PROFILE,it displaying only 'vvc'
can any one explain what is vget & how we will get all the values of ABC
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: vegt

Postby NicC » Fri Jun 08, 2012 11:01 am

You really need to read up in the manual - probably the ISPF Dialogue Developer's Guide and Reference (SC34-4821-07 is the version I have) easily obtainable via Google. In summary: ISPF provides 3 areas of storge where you can store data(variables). You store variables in the pool using VPUT and retrieve them by VGET. The exact syntax iand pools are in the manual - use it, play with it, come back if, after exhaustive playing, you stil have problems. Remember - they are scalar variable names not arrays and each variable can only hold one value so if you repeatedly VPUT a variable wih different values the latest value over-writes the last value.

That posibly covers what you have done wrong. If it does not then post your relevant bits of code - using the code tags or the post will be deleted, at worst, or locked, at best.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
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

Re: vegt

Postby surime72 » Fri Jun 08, 2012 11:23 am

i was new to this forum i dont no how to keep in black scerren,
was new to ispf dialog developing,
CALL ISPLINK ('VGET ','(PARTNO) ', 'SHARED');
it getiing only last row in the screen
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: vegt

Postby NicC » Fri Jun 08, 2012 12:00 pm

To get the code tags do not use the Quick Reply button but the 'Post Reply' button at bottom left. there are formatting buttons there including one for code. Highlight what you want to appear green-on-black and click on the code button. Use the Preview button to see what it will look like once posted. Below the preview will be your input box so that you can make changes before previewing again. Once happy, click the Submit button. You can also get to the full editor by clicking on Quick Reply and then the 'Full editor' button which is beside the submit button.

Now - you are VGETting the variable PARTNO. When you display it it will show only the LAST value VPUT to PARTNO as that will overwrite the vaalue that was in PARTNO before just like any other assignment to a variable whether it be in a pool or in your program. If you want to save lots of partnos then you have to save them - either to an ISPF table or a dataset just like you would any other data.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
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

Re: vegt

Postby surime72 » Fri Jun 08, 2012 12:27 pm

   P2200_VALIDATE_PARTNO: PROCEDURE;                           
   CALL ISPLINK ('VGET ','(PARTNO) ', 'PROFILE');               
   EXEC SQL                                                     
    SELECT I_PART INTO :WI_PART FROM EPPS.EOGPREC               
       WHERE I_PART = :PART_N;                                 
       IF (WI_PART ¬= PART_N)                                   
     THEN DO;                                                   
      IF  PFKEY = 'PF05' THEN                                   
 
  EXEC SQL                                                   
     DECLARE CURPART CURSOR FOR                                 
     SELECT PART_NO FROM PRDT.TBPART04                         
            WHERE PART_NO = :PART_N;                           
 EXEC SQL                                                       
EXEC SQL                                                         
   OPEN CURPART;                                                 
                                                                 
 IF (SQLCODE ¬= 0) THEN                                         
   DO;                                                           
      TABLE_ID = 'EOGPREC';                                     
      CALL P9000_SQL_ERROR;                                     
      RETURN;                                                   
   END;                                                         
                                                                 
 EXEC SQL                                                       
   FETCH CURPART                                                 
    INTO :VPARTNO;                                               
   IF SQLCODE = 0                                               
   THEN DO;                                                     
                  CALL ISPLINK('SETMSG ', 'INVNA700');           
                  CALL ISPLINK('TBDISPL', 'INVNP700');           
                  END;                                           
                  END;                                           
==>                                                  Scroll ===> CS
                  END;
/* EXEC SQL                                                       
     SELECT I_PART INTO :WI_PART FROM EPPS.EOGPREC;               
       IF (WI_PART  ¬= VPARTNO)                                   
       THEN DO; */                                                 
 EXEC SQL                                                       
   UPDATE EPPS.EOGPREC                                             
       SET I_PART = :PART_N                                       
       WHERE I_PART = :WI_PART;                                   
       IF SQLCODE = 0                                             
       THEN DO;                                                   
                  CALL ISPLINK ('TBDELETE','INVNT701');           
                  CALL ISPLINK('SETMSG ', 'INVNA700');             
                  CALL ISPLINK('TBDISPL', 'INVNP700');             
            END;                                                   
            END;                                                   
            END;                                                   
      END;                                                         
      END;                                                         
  IF SQLCODE ¬= 0 & SQLCODE ¬= 100                         
       THEN DO;                                           
       TABLE_ID = 'EOGPREC ';                             
       CALL P9000_SQL_ERROR;                               
       RETURN;                                             
       END;                                               
   IF SQLCODE = 100                                       
        THEN DO;                                           
     CALL ISPLINK ('VPUT ','(C)','PROFILE');               
    CALL ISPLINK                                           
       ('DISPLAY', 'INVNP701');                           
 IF C = 'Y' THEN DO;                                       
      PLANNAME = 'PRDT101';                               
      CALL ISPLINK ('VPUT','(PARTNO)','PROFILE');         
      BUFF = 'CMD(%DB2EXEC PGMNAME('||PLANNAME||'))';     
      CALL ISPLINK ('CONTROL','DISPLAY','SAVE');           
      CALL ISPLINK('SELECT',L33,BUFF);                     
      CALL ISPLINK ('CONTROL','DISPLAY','RESTORE');       
   END;                                                   
IF C = 'N' THEN DO;                                   
  CALL ISPLINK                                         
       ('DISPLAY', 'INVNP700');                         
                                                       
   END;                                                 
                                                       
   END;                                             
                                                       
  CALL ISPLINK                                       
       ('DISPLAY', 'INVNP701');                         
     CALL ISPLINK ('VPUT ','(CREATE)','PROFILE');       
    CALL ISPLINK                                       
       ('DISPLAY', 'INVNP701');                         
    CALL ISPLINK ('TBDISPL', 'INVNT701', 'INVNP701');
     EXEC SQL                                       
             CLOSE CURPART;                             
        RETURN;                                         
        END; 

surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: vegt

Postby surime72 » Fri Jun 08, 2012 12:29 pm

thank u nicc,

here my requirement is if the user updated in screen need to check in master table and need to update child table,

was new to this ispf dialog,,,
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: vegt

Postby NicC » Fri Jun 08, 2012 2:56 pm

Well, I see you VGET and VPUT PARTNO but those are the only two references I can spot. You have VPARTNO PART_N PART_NO etc but these are never associated with PARTNO.

BTW - thanks for using the code tags.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
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

Re: Need information about VGET

Postby surime72 » Fri Jun 08, 2012 3:15 pm

CALL ISPLINK ('VDEFINE','(PARTNO  )',PART_N         ,'CHAR ',LEN10);


and the ramaining varibles are defined in my program,
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need information about VGET

Postby surime72 » Fri Jun 08, 2012 3:24 pm

and what is the way to select all rows from panel to program
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need information about VGET

Postby Pedro » Fri Jun 08, 2012 7:07 pm

The VGET only gets the current row of the table. You need to move to the top, then access each table row, one at a time. Use TBSKIP.
But I do not think you will need VGET, just TBSKIP to get the next row values.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Next

Return to TSO & ISPF