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
 

 

rexx error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: rexx error
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

Moderator Team Head


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

PostPosted: Thu Dec 15, 2011 5:47 pm    Post subject: Reply to: rexx error
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Thu Dec 15, 2011 5:56 pm    Post subject: Re: Reply to: rexx error
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    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Dec 15, 2011 6:05 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 15, 2011 6:17 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 15, 2011 6:46 pm    Post subject:
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    Post subject:
Reply with quote

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

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Thu Dec 15, 2011 6:52 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Dec 15, 2011 7:54 pm    Post subject: Reply to: rexx error
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    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 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