At 12:34 +0000 on 02/10/2013, [email protected] wrote about Re:
DSPSERV with SCOPE=?:

Robert Rosenberg wrote
Why not just multi-path logic? You pass a flag for the scope in pass_scope
as 0=SINGLE, 4=ALL, 8=COMMON and go:

I actually use a similiar logic now, I was trying to get a single
routine and once instance of the macro.


OK. Try this trick. Assemble the macro 3 times and see what the
setting in the parms is for the scope values. The current code does a
MF=E to a MF=L template. Use the Macro as usual but follow it with an
ORG *-4 to back up over the BALR (or whatever the call is) and then
add your own modification to the MF=L using the correct value from
the 3 test assemblies followed by the overlaid instruction. IOW:
Instead of having three copies of the macro call, just have one but
simulate the MF=E instruction that you can not make dynamic.

---------- Original Message ----------
From: "Robert A. Rosenberg" <[email protected]>
To: [email protected]
Subject: Re: DSPSERV with SCOPE=?
Date: Sat, 9 Feb 2013 15:32:25 -0500

At 15:53 +0000 on 02/09/2013, [email protected] wrote about DSPSERV
with SCOPE=?:

I would like to develope a single routine which is passed
parameters, but the SCOPE= parameter does not seem to allow a
parameter to be passed.
For Example:
          DSPSERV CREATE,
                NAME=DSP_NAME,
                SCOPE=SINGLE,
                STOKEN=DSP_STOKEN,
                BLOCKS=DSP_BLOCKS,
                ORIGIN=DSP_ORIGIN,
                NUMBLKS=DSP_#BLK,
                MF=(E,WRKDSPLI)
*

Are there any recommended techniques that can be used to supply a Variable
for SCOPE ?
I was hoping I could use a register for it.

Why not just multi-path logic? You pass a flag for the scope in pass_scope
as 0=SINGLE, 4=ALL, 8=COMMON and go:

    L R1,pass_scope
    B *+4(R1)
    B SINGLE
    B ALL
    B COMMON
*
SINGLE DSPSERV CREATE,
                NAME=DSP_NAME,
                SCOPE=SINGLE,
                STOKEN=DSP_STOKEN,
                BLOCKS=DSP_BLOCKS,
                ORIGIN=DSP_ORIGIN,
                NUMBLKS=DSP_#BLK,
                MF=(E,WRKDSPLI)
      B  DONE
ALL    DSPSERV CREATE,
                NAME=DSP_NAME,
                SCOPE=ALL,
                STOKEN=DSP_STOKEN,
                BLOCKS=DSP_BLOCKS,
                ORIGIN=DSP_ORIGIN,
                NUMBLKS=DSP_#BLK,
                MF=(E,WRKDSPLI)ALL

     B DONE
COMMON DSPSERV CREATE,
                NAME=DSP_NAME,
                SCOPE=COMMON,
                STOKEN=DSP_STOKEN,
                BLOCKS=DSP_BLOCKS,
                ORIGIN=DSP_ORIGIN,
                NUMBLKS=DSP_#BLK,
                MF=(E,WRKDSPLI)
DONE DS 0H

Reply via email to