View previous topic :: View next topic |
Author |
Message |
Naresh Beginner
Joined: 27 Apr 2012 Posts: 8 Topics: 1
|
Posted: Fri May 04, 2012 12:17 pm Post subject: |
|
|
Hi Nic --- Thanks for your response!!! Couple of points I want to bring infront of you.
1. Yes i agree in the previous post i forget to add MACRO and even Adding a Macro still iam getting the same errors. that is only reason why i have added the MAcro and posted.
2. People who started as begginer like me - will reach or post to forums only when they face problems even after going through manuals. so please don't think that without reading manuals or just with cut copy paste from goggle we are starting from there.
3. How much senior or how much intelligent he/she would be - they have to start their carrier as a begginer only
I tried executing this commands individually at that time it works fine ut when iam trying to execute this through macro iam facing this problem and i don't know where am going wrong. this is the only reason why i post.
anyway Thanks for responding to my uery NIC. Have a Nice Day!!! |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Fri May 04, 2012 11:14 pm Post subject: |
|
|
Sounds like it is time to take a step back and consider. The topic appears to be moving back-and-forth rather than proceeding towards a solution.
When posting concepts or code it is most important that the post contain accurate, correct info. There has been some confuson due to the inconsistency of the posts from Naresh.
Even beginners can be expected to post what they intend to post. One way to improve quality is to use the Preview function so the poster can see their post as it will appear to the forum.
Suggest you look at another macro that is working on your system, compare the way it is structured with the problem macro, and change yours accordingly.
Quote: | what does it mean that macroex is not an ISPedit macro? |
The way you posted (i.e. without using the Code tag) your macro name was taken as being part of the code. _________________ All the best,
di
Last edited by papadi on Sun May 06, 2012 8:17 pm; edited 1 time in total |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Sat May 05, 2012 4:37 am Post subject: |
|
|
Well, with regard to coming to the forum for help: when I was learning macros there were no forums - there was no Internet! - so I used other peoples macros as examples and the manual and eventually I got the stuff to work. And I asked my colleagues. Oh, and because there was no internet there were no on-line manuals so you had to search the manuals cupboard/rack and then everyone's desks to find what you were looking for - you might even have to go to another department and 'borrow' their copy.
Now, the fact that you try the commands individually beforehand does not mean they will work in a macro. Macros have different requirements from interactive - some commands work differently, some are not available and some are extra. That is why the word 'MACRO' is in the title of the manual I pointed you to - to recognise that edit commands and macro commands, although similar (and often identical) can differ. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
Naresh Beginner
Joined: 27 Apr 2012 Posts: 8 Topics: 1
|
Posted: Sat May 05, 2012 10:41 am Post subject: |
|
|
Hi Nic - Well said and I agree with you . Fine will now jump into actual topic
Thing is - When iam invoking a my macro i.e. MACROEX(above mentioned) from my REXX1 program the MACROEX is not returning any value for sure the commands and syntax which i wrote are correct but i guess the problem is with only invoking the macroex?
Well i achived my reuirement without Macro but my only intention to know what's going wrong with macro??????
did anyone came with this kind of reuirement? |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sun May 06, 2012 2:52 am Post subject: |
|
|
add
address ispexec "CONTROL ERRORS CANCEL"
in the macro to let the session crash on an error OR print zerrsm & zerrlm after any RC >= 8.
Either method should show what the RC20 was caused by. If not there are other techniques but checking return codes is _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Sun May 06, 2012 7:15 am Post subject: |
|
|
This should get you started - it is a working macro doing what you want apart from letting a calling program access the results. Technically it is incomplete as error checking is almost non-existent.
Code: | Trace o
Address ISREDIT
'Macro (param)'
'X ALL'
'F ALL 'param
'(finds,lines) = FIND_COUNTS'
finds = Strip(finds,L,0)
lines = Strip(lines,L,0)
If \Datatype(finds,N)
Then Do
finds = 0
lines = 0
End
Select
When (finds = 0) Then Do
ZEDSMSG = '"'param'" not found'
ZEDLMSG = 'The string "'param'" was not found at all'
End
When (finds = 1) Then Do
ZEDSMSG = '"'param'" found'
ZEDLMSG = 'The string "'param'" was found once only'
End
Otherwise
ZEDSMSG = '"'param'" found 'finds' times'
ZEDLMSG = 'The string "'param'" was found 'finds' times ',
'on 'lines' lines'
End
Address ISPEXEC 'SETMSG MSG(ISRZ000)'
Address TSO
Exit |
_________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
|
|