View previous topic :: View next topic
|
Author |
Message |
pjavid
New User
Joined: 09 Jul 2009 Posts: 5 Location: VA
|
|
|
|
Hi,
I need to convert the following CLIST to REXX. I have no clue about REXX. I have tried looking to see if there is something similar on this forum, but I have been unable to find. Can some one help me this?
PROC 0
CONTROL LIST
WRITE
WRITE
WRITE THIS IS A TEST TO EDIT A DATASET AND SUBMIT AFTER CHANGING THE USERID
WRITE
WRITE &SYSDATE &SYSTIME &SYSUID
WRITE
WRITE
EDIT "DATASET(EMAIL2)' CNTL
RENUM
C 10 999999 'TEMPNAME' '&SYSUID' ALL
SUBMIT
/*LIST
END
Thanks,
Parviz |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Quote: |
I have no clue about REXX. |
Even if there were some kind of converter, I recommend that you learn rexx before try to use it. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Look in the REXX reference manual for the SAY instruction and for the ADDRESS TSO command. |
|
Back to top |
|
|
pjavid
New User
Joined: 09 Jul 2009 Posts: 5 Location: VA
|
|
|
|
Pedro wrote: |
Look in the REXX reference manual for the SAY instruction and for the ADDRESS TSO command. |
I did that and this is what I have. This is not working. I am not sure what I am missing.
/* REXX */
SAY 'THIS IS A TEST TO EDIT DATASET AND SUBMIT JOB'
ADDRESS TSO
"ADDRESS ISPEXEC EDIT DATASET("DATASET(EMAIL2)")"
ISREDIT "C "TEMPNAME" "&SYSUID" ALL"
ISREDIT "SUBMIT"
EXIT |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
This is not working. |
Do not post "it is not working". . .
If it is not working, you need to provide any diagnostic info generated and explain just how it is not working. |
|
Back to top |
|
|
pjavid
New User
Joined: 09 Jul 2009 Posts: 5 Location: VA
|
|
|
|
dick scherrer wrote: |
Hello,
Quote: |
This is not working. |
Do not post "it is not working". . .
If it is not working, you need to provide any diagnostic info generated and explain just how it is not working. |
Ok, When I execute it. I get the following.
THIS IS A TEST TO EDIT DATASET AND SUBMIT JOB,
4 +++ "ADDRESS ISPEXEC EDIT DATASET("DATASET(EMAIL2)")"
Error running TEMP3, line 4: Routine not found, |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Your original program was using the TSO EDIT command which is different than the ISPF editor. |
|
Back to top |
|
|
pjavid
New User
Joined: 09 Jul 2009 Posts: 5 Location: VA
|
|
|
|
Pedro wrote: |
Your original program was using the TSO EDIT command which is different than the ISPF editor. |
Pedro,
Thanks for replying. I am aware there are differences. What I am not sure is what are the equivalent commands for edit, change and submit. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Code: |
/* REXX */
SAY 'THIS IS A TEST TO EDIT DATASET AND SUBMIT JOB'
ADDRESS ISPEXEC "EDIT DATASET("DATASET(EMAIL2)") MACRO(ABC)"
---------
ISREDIT "C "TEMPNAME" "&SYSUID" ALL"
ISREDIT "SUBMIT"
EXIT |
Notice, I changed your rexx program for the syntax of the EDIT instruction. It names the initial macro, a separate rexx program which will then do the edit instructions.
See the ISPF manual for "Edit and Edit Macros" |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Quote: |
Ok, When I execute it. I get the following. |
Issue this command:
and then when you get messages, they will be prefixed by the id, which you can google for (or look in manual for) |
|
Back to top |
|
|
pjavid
New User
Joined: 09 Jul 2009 Posts: 5 Location: VA
|
|
|
|
Pedro wrote: |
Quote: |
Ok, When I execute it. I get the following. |
Issue this command:
and then when you get messages, they will be prefixed by the id, which you can google for (or look in manual for) |
Thanks for your help. I will try it tomorrow and let you know what happens, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I recall doing a six month stretch converting CLIST to REXX
It & &DONE my &STR(HEAD) &NSTR(&IN) |
|
Back to top |
|
|
|