Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

VGET error in REXX
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Sat Oct 27, 2012 3:24 am    Post subject: VGET error in REXX
Reply with quote

This is the error message I get while executing a VGET statement. The problem is it does not appear with my mainframe ID but it does appear for others when they are doing it and its a new REXX.

Code:
"VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD SQLVSAM) PR
 OFILE"
        +++ RC(8) +++
 IRX0100I +++ Interactive trace.  TRACE OFF to end debug, ENTER to continue. +++

     45 *-*  SAY errortext(RC)
        >V>    "8"
        >F>    "Unexpected THEN or ELSE"
 Unexpected THEN or ELSE

Here is the panel -

Code:
+Command ===> _ZCMD                                              %F1 for
+Receiving PDS for JCL  .@SQLRECVP                                    #
%Verify PROC Libraries:
+  First PROC Lib . . . .@SQLCPRC                                     #
+  Second PROC Lib  . . .@SQLCPRC2                                    #
+  (Please enter ZZZ.PROD.PRO in case no test PROC overrides are     #
+   needed. Also used on non-SQ conversion jobs. Do not leave blank.) #
%Verify Default PDS Libraries:
+  Control Card (CTC) . .@SQLCTC                                      #
+  Copy book (CPY). . . .@SQLCPY                                      #
+  Load library (LOD) . .@SQLLOD                                      #
+ (1.Please note these are test overrides only for SQ libraries, if   #
+  test libraries need to be fed to be used in conversion jobs for    #
+  Other systems the option would be provided in later screens.)      #
+ (2.Please press F1 to get more insight into these libraries and data#
+  expected, let them be production as default values present on the  #
+  screen in case no test libraries need to be used.Do not leave blank)#
%Enter VSAM File Names:
+  SQT VSAM NODE. .@SQLVSAM          #
 +  (in the format <NODE>.POLXXXX etc...Pls press F1 for more info)   #
 %              ENTER to Continue, F3 to Restart/Make Changes
 )INIT
 .HELP = HFDSN
 VGET(ERRFLD) SHARED
 .CURSOR = &ERRFLD
 )PROC
 VER(&SQLCPRC,NONBLANK)
 VER(&SQLCPRC2,NONBLANK)
 VER(&SQLCTC,NONBLANK)
 VER(&SQLCPY,NONBLANK)
 VER(&SQLLOD,NONBLANK)
 VER(&SQLVSAM,NONBLANK)
 VER(&SQLVSAM,LEN,'<',18)
 VPUT (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD,SQLVSAM) PROFILE
 )END
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Oct 27, 2012 3:49 am    Post subject:
Reply with quote

Code:
"VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD SQLVSAM) PR
 OFILE"
        +++ RC(8) +++

Code:
 VER(&SQLVSAM,LEN,'<',18)
 VPUT (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD,SQLVSAM) PROFILE
 )END
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sat Oct 27, 2012 4:53 am    Post subject: Reply to: VGET error
Reply with quote

I do not believe it is a VGET error, but a rexx error instead.

Code:
"Unexpected THEN or ELSE"


Show us everything from the last IF statement through to your VGET statement. My many years of debugging rexx leads me to suspect there is an "Unexpected THEN or ELSE"

| actually, the extraneous THEN/ELSE probably follows the VGET.
Back to top
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Sat Oct 27, 2012 5:18 am    Post subject:
Reply with quote

Sorry it looks like I pasted the wrong VGET, here is how it is coded in my CLIST.

"VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD",
"SQLVSAM) PROFILE"

I am checking RC after every step in my INIT para and the first time I see RC 8 is on the VGET so I do not know how this VGET is coming into picture, does it scan the REXX as part of VGET. I am not a regular REXX programmer but picking it after some years.


Code:
 SIGNAL ON HALT
 SIGNAL ON SYNTAX

 CALL init
 CALL displayScreens
 IF RC \= 8 THEN DO
    bScreensDone = 1
    CALL convertSkeleton
 END
 CALL cleanup


Code:
init:
   UserID = SYSVAR(SYSUID)
   bScreensDone = 0
   bRedo = 0 /* Flag to let us know if we are starting over */
             /* do not want to reset defaults for changed values */
   ADDRESS ISPEXEC
   ERRORSW  = 'N'
   "LIBDEF ISPPLIB DATASET ID('CKT.ALTxxxx.MODEL.PANELS.SQSETR1')"
   "VGET (CYCUID,ACNTCDE,HOLD,CURRCYCL,PDSPRFX) PROFILE"
   "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD",
          "SQLVSAM) PROFILE"
   "VGET (TMDDATE2,PREVDAT2,CK4input,CURCYCK,TPAinput,CURCYTP",
         "MGinput,CURCYCM,IPinput,CURCYCCI,ALinput,CURCYCA",
         "VAinput,CURCYCV,ACinput,PLinput) PROFILE"
   "VGET (DFLTPARM,DFLTLOD) PROFILE"
   "VGET (ALCTC,ALLOD) PROFILE"
   "VGET (PCCTC,PCLOD) PROFILE"
   ADDRESS TSOXEC
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Sat Oct 27, 2012 1:05 pm    Post subject: Reply to: VGET error
Reply with quote

You have some missing commas in the variable lists ...

Code:
   "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD",
          "SQLVSAM) PROFILE"
   "VGET (TMDDATE2,PREVDAT2,CK4input,CURCYCK,TPAinput,CURCYTP",
         "MGinput,CURCYCM,IPinput,CURCYCCI,ALinput,CURCYCA",
         "VAinput,CURCYCV,ACinput,PLinput) PROFILE"


Code:
should be
   "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD,",
          "SQLVSAM) PROFILE"
   "VGET (TMDDATE2,PREVDAT2,CK4input,CURCYCK,TPAinput,CURCYTP,",
         "MGinput,CURCYCM,IPinput,CURCYCCI,ALinput,CURCYCA,",
         "VAinput,CURCYCV,ACinput,PLinput) PROFILE"



Quote:
here is how it is coded in my CLIST.


and learn to use the right terms... that' s REXX not CLIST icon_cool.gif
Back to top
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Sat Oct 27, 2012 1:36 pm    Post subject: Reply to: VGET error
Reply with quote

Does not help I tried this option - It gives me the same error message. Also please note that it does not give this error with some IDs.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Oct 29, 2012 7:47 pm    Post subject:
Reply with quote

Whats this :
Code:
ADDRESS TSOXEC
?

Quote:

Does not help I tried this option - It gives me the same error message. Also please note that it does not give this error with some IDs.


What option? Enrico's commas? Show the trace ouput, or it didnt happen.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Oct 29, 2012 10:37 pm    Post subject: Reply to: VGET error
Reply with quote

Quote:
I am checking RC after every step in my INIT para


There is no sign of that in the code you posted. Is that the actual code or some sanitized version of it? You should not ask us to help solve your problem if you do not show us the version that fails.

Can you reorder your VGET statements so that the failing one is done first, and show us the entire trace through to the failure?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Oct 29, 2012 10:47 pm    Post subject: Reply to: VGET error
Reply with quote

is it so difficult to look at the manual Yourself for the explanation
of the RC 8 after a VGET ???

or use the model command ???

try with

Code:

 ****** ***************************** Top of Data ******************************
 000001 /* rexx */
 000002 trace "o"
 000003 signal on novalue name novalue
 000004 Address ISPEXEC "VGET (N1 N2) "
 000005 say RC
 000006 say n1 n2
 000007 Address ISPEXEC "VGET (N1 N2) SYMDEF SYMNAMES(SYSNAME SYSPLEX)"
 000008 say RC
 000009 say rxvars()
 000010 say n1 n2
 000011 exit
 000012 novalue:
 000013 say  "*********************************"
 000014 say  "**                             **"
 000015 say  "** novalue trapped at line" || right(sigl,4) || " **"
 000016 say  "**                             **"
 000017 say  "*********************************"
 000018 exit
 ****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Tue Oct 30, 2012 10:22 am    Post subject:
Reply with quote

1. TSOXEC was wrongly placed, have removed but it did not help.

2. I am checking RC after every step - by this I meant I started trace I a few statements before the VGET giving RC 8 and i could see RC 0 and then RC 8 started on the VGET in question.

This is how my paragraph looks like exactly coded

Code:
init:
   trace ?i
   UserID = SYSVAR(SYSUID)
   bScreensDone = 0
   bRedo = 0 /* Flag to let us know if we are starting over */
             /* do not want to reset defaults for changed values */
   ADDRESS ISPEXEC
   ERRORSW  = 'N'
   "LIBDEF ISPPLIB DATASET ID('XKT.ALTXXXX.MODEL.PANELS.SETR1')"
   "VGET (CYCUID,ACNTCDE,HOLD,CURRCYCL,PDSPRFX) PROFILE"
   "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD",
          "SQLVSAM) PROFILE"
    SAY errortext(RC)
   "VGET (TMDDATE2,PREVDAT2,CK4input,CURCYCK,TPAinput,CURCYTP",
         "MGinput,CURCYCM,IPinput,CURCYCCI,ALinput,CURCYCA",
         "VAinput,CURCYCV,ACinput,PLinput) PROFILE"
   "VGET (DFLTPARM,DFLTLOD) PROFILE"
   "VGET (ALCTC,ALLOD) PROFILE"




And this is the trace I output

Code:
IRX0100I +++ Interactive trace.  TRACE OFF to end debug, ENTER to continue. +++


    36 *-*  bScreensDone = 0
       >L>    "0"

    37 *-*  bRedo = 0 /* Flag to let us know if we are starting over */
       >L>    "0"

    38 *-*  /* do not want to reset defaults for changed values */
    39 *-*  ADDRESS ISPEXEC

    40 *-*  ERRORSW  = 'N'
       >L>    "N"

    41 *-*  "LIBDEF ISPPLIB DATASET ID('XKT.ALTXXX.MODEL.PANELS.SETR1')"
       >L>    "LIBDEF ISPPLIB DATASET ID('XKT.ALTXXX.MODEL.PANELS.SETR1')"

    42 *-*  "VGET (CYCUID,ACNTCDE,HOLD,CURRCYCL,PDSPRFX) PROFILE"
       >L>    "VGET (CYCUID,ACNTCDE,HOLD,CURRCYCL,PDSPRFX) PROFILE"

   43 *-*  "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD",
           "SQLVSAM) PROFILE"

       >L>    "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD"
       >L>    "SQLVSAM) PROFILE"
       >O>    "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD SQLVSAM) PR
OFILE"
       +++ RC(8) +++
     45 *-*  SAY errortext(RC)
        >V>    "8"
        >F>    "Unexpected THEN or ELSE"
 Unexpected THEN or ELSE

Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 30, 2012 10:30 am    Post subject:
Reply with quote

Code:

43 *-*  "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD",
           "SQLVSAM) PROFILE"



There is a comma missing.
Back to top
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Tue Oct 30, 2012 10:46 am    Post subject:
Reply with quote

Oh sorry i missed it but it does not make any difference



Code:
     44 *-*  "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD,",
             "SQLVSAM) PROFILE"
        >L>    "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD,"
        >L>    "SQLVSAM) PROFILE"
        >O>    "VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD, SQLVSAM) P
 ROFILE"
        +++ RC(8) +++

     46 *-*  SAY RC
        >V>    "8"
 8

     47 *-*  SAY errortext(RC)
        >V>    "8"
        >F>    "Unexpected THEN or ELSE"
 Unexpected THEN or ELSE
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 30, 2012 12:25 pm    Post subject:
Reply with quote

Try the next statement on 1 line :

Code:

"VGET (SQLRECVP,SQLCPRC,SQLCPRC2,SQLCTC,SQLCPY,SQLLOD SQLVSAM) PROFILE"
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Oct 30, 2012 12:33 pm    Post subject: Reply to: VGET error
Reply with quote

what is that You do not understand

a RC 8 means that a variable that You are trying to VGET is not there

my previous suggestion was based on the wrong assumption that the separator had to be the same

I just tested an the space and the comma can be mixed

anyway ...
fix the RC 8
and fix the logic flow ... ( THEN ELSE ) stuff

it is not uncommon to obtain different results from the VGET for different users

the names found could be leftovers.

when testing it usually good habit to
1) start with an empty profile
2) DELETE from the profile all the variables
Back to top
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Tue Oct 30, 2012 12:53 pm    Post subject:
Reply with quote

i put in one line and it did not work.

I am not able to track which 'THEN ELSE' it is talking about that is what i am trying to know....and that is what is causing RC 8, and not sure why it is coming as part of VGET


Can you please tell me how can we start with an empty profile and delete all the profile variables?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Oct 30, 2012 1:18 pm    Post subject: Reply to: VGET error
Reply with quote

look at the manuals for VERASE, VDELETE, VRESET

it would be nice if You posted the whole script
what You posted is pretty useless to provide help

to see what is going on

use the ispf option 7 Dialog test
and set a break BEFORE the VGET service
after that You can use suboption 3 to look at the variables
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Tue Oct 30, 2012 2:22 pm    Post subject:
Reply with quote

Quote:
This is how my paragraph looks like exactly coded

It is not a paragraph - it is a sub-routine/procedure. A paragraph is something that occurs in COBOL and printed material.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Tue Oct 30, 2012 8:26 pm    Post subject: Reply to: VGET error
Reply with quote

Worth noting:

RC 8 comes from your ISPF command (VGET),
ErrorText displays the REXX error.

It is not the same thing!
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Oct 30, 2012 8:56 pm    Post subject: Reply to: VGET error
Reply with quote

IMO the TS forgot to issue a display panel .... (*)
LIBDEF for what I suppose the library containing the panels
followed by a VGET
most probably the TS posted only what he felt like and not what could be useful.

in one of the first post the ts showed a panel fragment with the VPUTs

again...
POST THE WHOLE SCRIPT, not just some fragments

since we are the ones helping You should trust our judgement about the info we need ...
so post what we ask, not what You feel like
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Oct 30, 2012 9:26 pm    Post subject: Reply to: VGET error
Reply with quote

Quote:
It is not the same thing!


The VGET gets a RC=8 and then the rexx ERROR error handling routine gets called.

1. The problem with "Unexpected THEN or ELSE" is that he is using the errortext() function for a host command error when it is meant for a rexx syntax error. The errortext() function should be used in a SYNTAX error handling routine, not for ERROR.

2. The ERROR routine should not be active for VGET calls as RC=8 should be frequent occurrence.

This demonstrates the problem:
Code:
/* rexx  */             
signal on error         
Address ISPEXEC         
trace('I')             
"VGET (QQ99) PROFILE"   
                       
 return                 
                       
error:                 
SAY errortext(RC)       
return                 
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 -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us