View previous topic :: View next topic |
Author |
Message |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Mon Sep 08, 2008 10:07 pm Post subject: rexx stem and macro |
|
|
how can i put a dsn content into a rexx stem thru a macro ? |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Tue Sep 09, 2008 2:08 am Post subject: |
|
|
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 |
|
 |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Tue Sep 09, 2008 5:36 am Post subject: |
|
|
don't know how to handle .zfirst, .z..... vars.
could anyone put an exemple code, pls? |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Sep 09, 2008 6:27 am Post subject: |
|
|
now what diplomatic phrase are you going to use, expat? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Tue Sep 09, 2008 8:50 am Post subject: |
|
|
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
Quote: | now what diplomatic phrase are you going to use, expat? |
 _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Sep 09, 2008 10:24 am Post subject: |
|
|
The animated gif is a keeper. thx expat. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Tue Sep 09, 2008 11:34 am Post subject: |
|
|
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 |
|
 |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Tue Sep 09, 2008 11:36 am Post subject: |
|
|
i need to put the content of a opened dataset into the stem.. |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue Sep 09, 2008 2:32 pm Post subject: |
|
|
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 |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Wed Sep 10, 2008 1:21 am Post subject: |
|
|
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.
 _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
acevedo Beginner

Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Wed Sep 10, 2008 2:44 am Post subject: |
|
|
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 |
|
 |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Wed Sep 10, 2008 8:06 am Post subject: |
|
|
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 |
|
 |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Wed Sep 10, 2008 8:10 am Post subject: |
|
|
/*rexx*/
dat1.1 = Zfirst <= my question is here.
.
.
.
do A=1 to dat1.0
...
end |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Sep 10, 2008 9:24 am Post subject: |
|
|
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 |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Wed Sep 10, 2008 11:48 am Post subject: |
|
|
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 |
|
 |
|
|