MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

rexx stem and macro
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Mon Sep 08, 2008 10:07 pm    Post subject: rexx stem and macro Reply with quote

how can i put a dsn content into a rexx stem thru a macro ?
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Tue Sep 09, 2008 2:08 am    Post subject: Reply with quote

What problems have you encountered so far ?
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Tue Sep 09, 2008 5:36 am    Post subject: Reply with quote

don't know how to handle .zfirst, .z..... vars.
could anyone put an exemple code, pls?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Sep 09, 2008 6:27 am    Post subject: Reply with quote

now what diplomatic phrase are you going to use, expat?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Tue Sep 09, 2008 8:50 am    Post subject: Reply with quote

Well, it was the macro bit that threw me.

Why do you want to use a macro ? What is wrong with EXECIO to read the file within the REXX program, like we all do.

You need to
a) Free the DDNAME within the program
b) Allocate the DDNAME & DSN with disp of shr
c) EXECIO the file to a stem

There must be quite a few examples on the forum, because I know for a fact that I have posted some of them.

And if not, then there is almays the manual Confused

Quote:
now what diplomatic phrase are you going to use, expat?


curse
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Sep 09, 2008 10:24 am    Post subject: Reply with quote

The animated gif is a keeper. thx expat.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Tue Sep 09, 2008 11:34 am    Post subject: Reply with quote

Ladies and Gentlemans, how can i put a dsn content into a rexx stem thru a macro ?

expat.. pls don't feel obligate to post nothing. Thanks.
Back to top
View user's profile Send private message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Tue Sep 09, 2008 11:36 am    Post subject: Reply with quote

i need to put the content of a opened dataset into the stem..
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Sep 09, 2008 2:32 pm    Post subject: Reply with quote

As expat says - look at the manual - or other help - for EXECIO - that is the read/write module, for sequential files, used by REXX on MVS/z/OS etc
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Wed Sep 10, 2008 1:21 am    Post subject: Reply with quote

Explain to me your thing about macro - why must it be a macro ?

In fact a macro called from the REXX main program will probably not share common addressability and the stem created in the " must have" macro may well not be available to the calling routine so will be nothing more than a waste of time.

Click HERE and find out about EXECIO.

bonk
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Wed Sep 10, 2008 2:44 am    Post subject: Reply with quote

cyberuser wrote:
i need to put the content of a opened dataset into the stem..


expat gave you the key:

What is wrong with EXECIO to read the file within the REXX program
Back to top
View user's profile Send private message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Wed Sep 10, 2008 8:06 am    Post subject: Reply with quote

opening a dataset, i would like to run or a rexx/macro code to pickup the all the lines.... then i would work these lines into the stem and produce another stem to populate back the same dataset....

i have no issues on how to work with rexx stem, but my question is how to populate the rexx stem vars with the lines of the dataset content.

i understand the only way would be using a macro and the ZVARS ...
pls let me know if anyone else knows a workaround.

could someone point a example code about how to populate a rexx stem by use of zvars ?
Back to top
View user's profile Send private message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Wed Sep 10, 2008 8:10 am    Post subject: Reply with quote

/*rexx*/

dat1.1 = Zfirst <= my question is here.
.
.
.


do A=1 to dat1.0
...
end
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Sep 10, 2008 9:24 am    Post subject: Reply with quote

if you are editing or viewing a ds or pds member, then you would use the ISPF Macro Command LINE to input the one line of data to your stem variable. You would loop thru the LINE command increasing a line pointer until you reach the end of your workspace (which contains the ds).

If you wish to run the script without editing or viewing the ds, then you would use execio, after first allocating the ds.

now, if you still have questions, start with telling us which of the two scenarios, above, you plan on using.

if you have questions about ISPF Edit and EDIT MACROs here is a general link that will provide you a selection list. (the list is based on ISPF topic and ISPF VSN).

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FINDBOOK?filter=ISPF

by the way. The people who have been trying to help you, have done this about 10,000 times before (i don't mean dealing with petulant children, I mean actually accomplishing a task) and can be of great assistance to you, if you change your attitude.

Just because you think you know what you want does not mean you have expressed yourself with the proper technical description that would aid someone trying to give you assistance.

an example is dsn content. this means nothing. DataSet Name Content?
if you were trying to impress us with your command of mainframe jargon and abbreviations, you should have said DS content.

If the ds is large, you may have problems due to size limitations. You could easily exceed your TSO space by using an EDIT MACRO or a foreground script using EXECIO. You may have to run the job in batch using TMP.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Wed Sep 10, 2008 11:48 am    Post subject: Reply with quote

If you had used the link I provided earlier then you may have been knowledgable enough to use EXECO.

Yes. You can do this with a macro - but why write a complete new macro for what already exists.

As pointed out by Dick, the size of the dataset may cause you problems which can easily be circumvented by the use of EXECIO in that you can process the dataset in manageable sized portions.

Also, the point of repopulating the same dataset - dangerous. You should use a transient dataset and then repopulate from there after successful completion of the first part of the task.

Maybe if you actually told us what you wish to achieve then we could possibly suggest a better solution.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group