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
 

 

Syntactical Error in REXX

 
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: Thu Nov 25, 2010 9:30 pm    Post subject: Syntactical Error in REXX
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

Moderator Team Head


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

PostPosted: Thu Nov 25, 2010 9:49 pm    Post subject: Reply to: Error in REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Nov 25, 2010 9:49 pm    Post subject: Reply to: Error in REXX
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

http://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

Moderator Team Head


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

PostPosted: Thu Nov 25, 2010 9:50 pm    Post subject: Reply to: Error in REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Nov 25, 2010 9:56 pm    Post subject: Reply to: Error in REXX
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Nov 25, 2010 10:11 pm    Post subject: Reply to: Error in REXX
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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