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

rexx error


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vengatesan soubramany

New User


Joined: 15 Dec 2011
Posts: 5
Location: india

PostPosted: Thu Dec 15, 2011 5:36 pm
Reply with quote

Hi,

I am trying to create REXX tool to FTP from mainframe to desktop.
While executing, i am getting the following error,
COMMAND CD NOT FOUND
COMMAND QUI NOT FOUND

Below is the code,
Code:
/* REXX FTPIT */                                                 
"ISREDIT MACRO"                                                   
"ISREDIT (CURRDSN) = DATASET"                                     
"ISREDIT (DID) = DATAID"                                         
"ISREDIT (MEMB) = MEMBER"                                         
/* PARSE UPPER SOURCE . . EXECNAME . EXECCURRDSN . . EXECENV . */
"ALLOC DD(SYSPRINT) DUMMY REU"                                   
"ALLOC DD(OUTPUT)   DUMMY REU"                                   
DDNFTP = '#'RIGHT(TIME(S),7,'0')                                 
 IF LENGTH(MEMB) <> 0 THEN                                       
  DO                                                             
    "ALLOC DDN("DDNFTP") DSN('"CURRDSN"("MEMB")') SHR REUSE"     
  END                                                             
ELSE                                                             
  DO                                                             
    "ALLOC DDN("DDNFTP") DSN('"CURRDSN"') SHR REUSE"             
  END                                                             
  /* PROCESS INLINE PANEL AND MESSAGE DEFINITIONS */             
  DDNAME = '$'RIGHT(TIME(S),7,'0')                               
  MEMNAME = 'ZZ'                                                 
  "ALLOC DD("DDNAME") NEW REU RECF(F B) LRECL(80) DIR(2) SP(1) TR"
  "ISPEXEC LMINIT DATAID(DID) DDNAME("DDNAME") ENQ(EXCLU)"       
  "ISPEXEC LMOPEN DATAID("DID") OPTION(OUTPUT)"                   
  DO 1                                                           
    DO A = 1 TO 999 UNTIL SUBSTR(LINE,1,8) = '/*MEMBER'           
      LINE = SOURCELINE(A)                                       
    END                                                           
    PARSE VAR LINE . MEMNAME .                                         
    DO A = (A + 1) TO 999 WHILE SUBSTR(LINE,1,2) <> '*/'               
     LINE = SOURCELINE(A)                                               
     "ISPEXEC LMPUT DATAID("DID") MODE(INVAR) DATALOC(LINE) DATALEN(80)"
    END                                                                 
    "ISPEXEC LMMADD DATAID("DID") MEMBER("MEMNAME")"                   
  END                                                                   
  "ISPEXEC LMFREE DATAID("DID")"                                       
  "ISPEXEC LIBDEF ISPPLIB LIBRARY ID("DDNAME") STACK"                   
  "ISPEXEC DISPLAY PANEL(FTPIT)"                                       
IF RC = 0 THEN                                                         
  DO                                                                   
    QUEUE "SENDSITE"                                                   
    QUEUE "ASCII"                                                       
    QUEUE "CD TEMP"                                                     
    QUEUE "PUT //DD:"DDNFTP" "FILENAME                                 
    QUEUE "QUI"                                                         
    X = OUTTRAP(X.)                                                     
    "FTP "SERVER" 21 (EXIT=8"                                           
    RETCODE = RC                                                       
    X = OUTTRAP(OFF)                                                   
    IF RETCODE = 0 THEN ZEDLMSG = 'SUCCESS'                             
    ELSE                ZEDLMSG = 'FAILED'                             
    ZEDLMSG = TIME('L') EXECNAME ZEDLMSG 'RC='RETCODE                   
    "ISPEXEC SETMSG MSG(ISRZ000)"                                       
  END                                                                   
EXIT 0                                                                 
/*MEMBER FTPIT                                                         
)ATTR DEFAULT(%+_)                           
  $ TYPE(INPUT) INTENS(LOW) PAD(_) CAPS(OFF) 
  _ TYPE(INPUT) INTENS(LOW) PAD(_) CAPS(ON)   
  ! TYPE(INPUT) INTENS(LOW) PAD(' ') CAPS(OFF)
  ` TYPE(OUTPUT) INTENS(HIGH)                 
)BODY EXPAND(//) WIDTH(80) CMD()             
%/-/ FTP PROCESSING FACILITY /-/+             
%COMMAND ==>!ZCMD                             
+                                             
+ENTER FTP SERVER ADDRESS%=>_Z               
+ENTER TARGET FILENAME   %=>_Z               
+                                             
+                                             
+                                             
+                                             
+ENTER%ENTER+TO CONTINUE OR%END+TO EXIT.     
)INIT                                         
  .ZVARS = '(SERVER FILENAME)'               
)PROC                                         
)END                                         
*/


Please someone help me to solve this issue.

Thanks,
Vengatesan
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 Dec 15, 2011 5:47 pm
Reply with quote

That sure looks a lot like some code I wrote once. Anyway, I'd like to see output messages from the OUTPUT DD statement.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 15, 2011 5:56 pm
Reply with quote

superk wrote:
That sure looks a lot like some code I wrote once. Anyway, I'd like to see output messages from the OUTPUT DD statement.


Maybe you mean this Kevin?

EDIT: So, to answer here to the following post, provide the output that Kevin has requested already.
Back to top
View user's profile Send private message
vengatesan soubramany

New User


Joined: 15 Dec 2011
Posts: 5
Location: india

PostPosted: Thu Dec 15, 2011 6:01 pm
Reply with quote

Hi Kevin,

I have taken this from u only.Please help me to solve this error.

Thanks,
Vengatesan S
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 Dec 15, 2011 6:05 pm
Reply with quote

vengatesan soubramany wrote:
Please help me to solve this error.

Thanks,
Vengatesan S


I'm trying to. Please post the output messages from the OUTPUT DD statement.
Back to top
View user's profile Send private message
vengatesan soubramany

New User


Joined: 15 Dec 2011
Posts: 5
Location: india

PostPosted: Thu Dec 15, 2011 6:08 pm
Reply with quote

while executing the rexx code,

i am getting this message
DATA SET CURRDSN NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
MISSING DATA SET NAME+
MISSING NAME OF DATA SET TO BE ALLOCATED
***

Regards,
Vengatesan S
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 15, 2011 6:17 pm
Reply with quote

And what does that tell you

Have you run it through with a trace and seen what is happening
Back to top
View user's profile Send private message
vengatesan soubramany

New User


Joined: 15 Dec 2011
Posts: 5
Location: india

PostPosted: Thu Dec 15, 2011 6:30 pm
Reply with quote

Kevin,

but i dont know trace...Please give me solution for this.just i am beginner to rexx.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 15, 2011 6:46 pm
Reply with quote

Please take the time to read who has responded, because I am not Kevin.

This is also a HELP forum and not a training forum for your employer.

I suggest that you read the REXX manuals, accessed from the sticky topic at the top of the CLIST/REXX forum, and then try the TRACE command
Back to top
View user's profile Send private message
vengatesan soubramany

New User


Joined: 15 Dec 2011
Posts: 5
Location: india

PostPosted: Thu Dec 15, 2011 6:48 pm
Reply with quote

sorry expat.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Dec 15, 2011 6:52 pm
Reply with quote

vengatesan,

I think it is admirable that you want to learn Rexx.

This program, while small is packed with many elements that are not Rexx.

This program contains:
ISPF Panel processing
ISREDIT macro processing
ISPF Library manager processing
TSO commands
Rexx commands

This is not a good program for a beginner to start with.

Just providing you a 'solution' will not help you learn Rexx.

You need to start with the basics.

Just my humble opinion.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Dec 15, 2011 7:54 pm
Reply with quote

for CD not working... hint: you copied the program, but you were not faithful in making the copy.

From where did you execute the rexx program?
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 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
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top