Posted: Thu Jun 07, 2012 6:55 am Post subject: Error in VGET
Hi
I'm trying to display the programs thru TBDISPL. After that if the user selects any program from the list, I'm displaying the selected program. To get the user response, I used VGET command, but I'm getting RC 20 after VGET.
This is my code:
'ADDPOP ROW(3) COLUMN(6)'
DO UNTIL PFKEY = 'PF3'
ADDRESS ISPEXEC "CONTROL DISPLAY REFRESH"
"TBDISPL MYLIST PANEL(LIST1) POSITION(CURROW)"
'VGET (I1 I2 I3 I4) PROFILE'
SAY 'I1=' I1 I2 I3 I4
SAY RC
IF RC = 8 THEN
DO
SAY 'PF3 PRESSED'
'REMPOP'
EXIT
END
ELSE DO
SAY 'ZCMD =' ZCMD
SAY 'CURROW =' CURROW
---------------------
Panel:
'ADDPOP ROW(3) COLUMN(6)'
DO UNTIL PFKEY = 'PF3'
ADDRESS ISPEXEC "CONTROL DISPLAY REFRESH"
"TBDISPL MYLIST PANEL(LIST1) POSITION(CURROW)"
'VGET (I1 I2 I3 I4) PROFILE'
SAY 'I1=' I1 I2 I3 I4
SAY RC
IF RC = 8 THEN
DO
SAY 'PF3 PRESSED'
'REMPOP'
EXIT
END
ELSE DO
SAY 'ZCMD =' ZCMD
SAY 'CURROW =' CURROW
IF CURROW > 0 THEN
DO
"TBTOP MYLIST"
CRP = CURROW -1
"TBSKIP(CRP) MYLIST"
SAY P1 P2 P3 P4
IF I1 = 'S' THEN
SAY 'SELECTED PROGRAM= ' P1
IF I2 = 'S' THEN
SAY 'SELECTED PROGRAM= ' P2
IF I3 = 'S' THEN
SAY 'SELECTED PROGRAM= ' P3
IF I4 = 'S' THEN
SAY 'SELECTED PROGRAM= ' P4
END
END
Joined: 25 Jun 2011 Posts: 26 Topics: 4 Location: Germany
Posted: Sat Jun 30, 2012 11:55 pm Post subject:
The length of an input field is determined by the size of the field in the panel definition. So, rather than I1, I2,... J, K,... or alternatively use .ZVARS to define, in effect, aliases for variable names - in this case, the Z pseudo variable is used in the panel definition.
RC 20 indicates a severe error; the ZERRLM system variable provides information about the error.
VGET is not normally required after a TBDISPL, in particular why VGET PROFILE?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum