Re: OPSYN Self Execution

2013-01-18 Thread John Ehrman
Try a technique like that illustrated in this example:

Macro ,  Defined in the source program
L  READ   A,B,C
READ_XX OpSyn  READ  Save Wrapper's definition as READ_XX
READOpSyn  , Nullify this macro's definition
- - -...perform 'front-end' processing
L  READ   A1,B1,C1   Call system version of READ
- - -...perform 'back-end' processing
READOpSyn  READ_XX   Re-establish Wrapper's definition
MEnd



Re: OPSYN Self Execution

2013-01-18 Thread Tony Harminc
On 18 January 2013 14:54, Bodoh John Robert john.robert.bo...@irs.gov wrote:

 I would like to augment the DC assembler instruction in some parts of a 
 program.  I would like to collect additional information from the DC 
 instruction.  I have been playing with the OPSYN statement to redefine the DC 
 assembler instruction to invoke a macro.  The problem I'm having is to get 
 the macro to re-issue the DC assembler instruction and have it behave the way 
 it should:

 DC   OPSYN MYDC

 MYDC  MACRO
 .
 .
 .* collect information
 .
 .
 DC   SYSLIST execute real DC
 MEND

 When I try such an example, I get an out of memory condition.  Does anyone 
 know if a technique to cause the real DC instruction to be executed?

You need
REALDC OPSYN DC
DCOPSYN MYDC
and then use REALDC in your MYDC macro instead of DC. You are out of
memory because your macro is recursively invoking itself.

Tony H.


Re: OPSYN Self Execution

2013-01-18 Thread Jonathan Scott
Ref:  Your note of Fri, 18 Jan 2013 19:54:13 +

If you want to modify DC, you need to define an opcode which
refers to the original DC first so that you can invoke it from
within the macro.

DC_  OPSYN DC  Set up alias for original DC
DC   OPSYN MYDCRedirect DC to my macro

Then within the macro you can use
 DC_   whatever   Issue real DC

Regards
Jonathan Scott
HLASM Development
IBM Hursley, UK


Re: OPSYN self execution

2013-01-18 Thread glen herrmannsfeldt
Jonathan Scott wrote:

 If you want to modify DC, you need to define an opcode which
 refers to the original DC first so that you can invoke it from
 within the macro.

 DC_  OPSYN DC  Set up alias for original DC
 DC   OPSYN MYDCRedirect DC to my macro

 Then within the macro you can use
  DC_   whatever   Issue real DC

But John Ehrman's method is neater, as it doesn't require a
special OPSYN from the outside.

Some one could directly call MYDC, or use OPSYN, either
way it would work.

I have never used OPSYN, but I have written postscript programs
that redefined the \def operator.

Now, what happens if OPSYN is OPSYNed?

-- glen


Automatic reply: OPSYN self execution

2013-01-18 Thread Evans, James R. (RET-DAY)
I am out of the office until Monday 1/28/2013.  I will read your note, as time 
permits, when I return to the office. If your e-mail is urgent and concerns a 
production issue/problem, please send your note to the 'GLO-RETS zOS Content' 
mailbox for attention.

Thanks!