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

Convert CLIST to REXX


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

New User


Joined: 09 Jul 2009
Posts: 5
Location: VA

PostPosted: Thu Jul 16, 2009 9:19 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Jul 16, 2009 9:22 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Jul 16, 2009 9:32 pm
Reply with quote

Look in the REXX reference manual for the SAY instruction and for the ADDRESS TSO command.
Back to top
View user's profile Send private message
pjavid

New User


Joined: 09 Jul 2009
Posts: 5
Location: VA

PostPosted: Thu Jul 16, 2009 9:56 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 16, 2009 11:42 pm
Reply with quote

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
View user's profile Send private message
pjavid

New User


Joined: 09 Jul 2009
Posts: 5
Location: VA

PostPosted: Fri Jul 17, 2009 12:23 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jul 17, 2009 1:26 am
Reply with quote

Your original program was using the TSO EDIT command which is different than the ISPF editor.
Back to top
View user's profile Send private message
pjavid

New User


Joined: 09 Jul 2009
Posts: 5
Location: VA

PostPosted: Fri Jul 17, 2009 1:43 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jul 17, 2009 3:34 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jul 17, 2009 3:36 am
Reply with quote

Quote:
Ok, When I execute it. I get the following.


Issue this command:
Code:
TSO PROFILE MSGID

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
View user's profile Send private message
pjavid

New User


Joined: 09 Jul 2009
Posts: 5
Location: VA

PostPosted: Fri Jul 17, 2009 3:42 am
Reply with quote

Pedro wrote:
Quote:
Ok, When I execute it. I get the following.


Issue this command:
Code:
TSO PROFILE MSGID

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Jul 17, 2009 11:18 am
Reply with quote

I recall doing a six month stretch converting CLIST to REXX

It & &DONE my &STR(HEAD) &NSTR(&IN)
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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top