View previous topic :: View next topic
|
Author |
Message |
vengatesan soubramany
New User
Joined: 15 Dec 2011 Posts: 5 Location: india
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
vengatesan soubramany
New User
Joined: 15 Dec 2011 Posts: 5 Location: india
|
|
|
|
Hi Kevin,
I have taken this from u only.Please help me to solve this error.
Thanks,
Vengatesan S |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
vengatesan soubramany
New User
Joined: 15 Dec 2011 Posts: 5 Location: india
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And what does that tell you
Have you run it through with a trace and seen what is happening |
|
Back to top |
|
|
vengatesan soubramany
New User
Joined: 15 Dec 2011 Posts: 5 Location: india
|
|
|
|
Kevin,
but i dont know trace...Please give me solution for this.just i am beginner to rexx. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
vengatesan soubramany
New User
Joined: 15 Dec 2011 Posts: 5 Location: india
|
|
|
|
sorry expat. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
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 |
|
|
|