IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syntactical Error in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Thu Nov 25, 2010 9:30 pm
Reply with quote

Quite embarassing but I am unable to get hold of the syntactical errors at end.
Code:
/********************************************************************/ 
/*REXX                                                              */ 
/*PURPOSE: ALLOCATE GDG BASES FOR A LIST PROVIDED -- NIKS.....      */ 
/********************************************************************/ 
/*** GET THE ARGUMENT NAME   **/                                       
PARSE ARG NAME                                                         
/*** INITIALIZE EOF          **/                                       
EOF = 'NO'                                                             
/*** ALLOCATE INPUT DATASET IN OLD DISPOSITION   **/                   
"ALLOC DA(NAME) F(GDGLIST) OLD"                                         
/*** LOOP READING THE INPUT INTO A STACK TILL EOF...TO RETRIEVE  ***/   
/*** WE GOT TO PULL THE DATA READ FROM THE STACK...     ***/           
DO WHILE EOF = 'NO'                                                     
   "EXECIO 1 DISKR GDGLIST"                                             
   IF RC = 2 THEN                                                       
      EOF = 'YES'                                                       
   ELSE                                                                 
      DO                                                               
        PARSE PULL LINE                                                 
        SAY LINE                                                       
        STRIPLINE = STRIP(LINE,T)                                       
        LEN = LENGTH(STRIPLINE)                                         
        IF LEN > 35 THEN                                               
            SAY 'GDG NAME' STRIPLINE 'IS TOO LONG'                     
         ELSE DO                                                       
             ADDRESS TSO                                               
             "DEFINE GDG (NAME("STRIPLINE") LIMIT(10) EMPTY SCRATCH)"   
/*           IF RC=0 THEN SAY 'GDG NAM HAS BEEN CREATED'   */           
             END                                                       
      END                                                               
END                                                                     
/**CLOSE THE DATASET          ***/                                     
"EXECIO 0 DISKR GDGLIST (FINIS"                                         
EXIT 0           
 
 
IKJ56534I STMT 17 - A(N) ELSE STMT WAS FOUND FOR WHICH THERE IS NO CORRESPONDIN
G IF STMT                                                                       
 IKJ56534I STMT 25 - A(N) ELSE STMT WAS FOUND FOR WHICH THERE IS NO CORRESPONDIN
G IF STMT                                                                       
 ***                               
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 25, 2010 9:49 pm
Reply with quote

If you open up an edit session using the ISPF Editor for a REXX Profile, it will highlight the specific loops. You have other HILITE options to review the code in different manners.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 25, 2010 9:49 pm
Reply with quote

did You look at the messages manual or search for IKJ56534I using lookAT
if You had You would have understood why You get the error icon_biggrin.gif

I could tell at first glance by looking at the snippet You posted...
and a simple guess about the content of SYSEXEC and SYSPROC

is this the first Rexx You are writing ???
IKJ56534I message is from TSO not REXX

check the REXX user guide ( for the concepts involved in this error ) here

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4C310/1.2.2?SHELF=IKJ4BK80&DT=20010706113306
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 25, 2010 9:50 pm
Reply with quote

Good catch. I didn't even notice the IKJ* message prefixes.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 25, 2010 9:56 pm
Reply with quote

I could have told the error right away,

I wanted to make sure that the message related to IKJ56534I contained the proper hint !

and it does indeed icon_biggrin.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: Thu Nov 25, 2010 10:09 pm
Reply with quote

Thanks I got it first line should contain REXX. The error I got I thought it was atleast able to take the REXX code. Sorry experts this is actually my first REXX, thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 25, 2010 10:11 pm
Reply with quote

nothing to be sorry! there is always a first time.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top