Sure thanks here it is I just inserted a DS CL&NUM in the last statement of DBGRPRLG and it printed a DS CL30 And in the first statement after the GBLC &NUM in DBGREPLG a DS CL&NUM and the assembler generated a DS CL0
I'll post the assembler listing in a different reply as I am getting a message
I exceeded number of lines allowed
MACRO
&NAME DBGRPRLG &DSA=
GBLC &NUM
AIF ('&DSA' EQ '').SET0
&NUM SETC '&DSA'
AGO .STORE
.SET0 ANOP
&NUM SETC '0'
.STORE ANOP
STMG R14,R12,8(R13)
LGR R10,R13
AIF ('&NAME' EQ '').SETCSECT
&NAME DS 0H
LARL R3,&NAME
USING &NAME,R3
AGO .SETNAB
SETCSECT ANOP
LARL R3,&SYSECT
USING &SYSECT,R3
.SETNAB ANOP
USING WS_DSECT,R13
LG R13,NAB-WS_DSECT(R13)
STG R10,128(,R13)
LA R11,NAB
AIF ('&NUM' EQ '0').NODSA
AH R11,=H'&NUM'
.NODSA ANOP
STG R11,NAB
MEND
MACRO
DBGREPLG
LCLC &CURCSECT
GBLC &NUM
&CURCSECT SETC '&SYSECT'
LG R13,128(,R13)
LA R11,NAB-WS_DSECT(R13)
STG R11,NAB
LMG R14,R12,8(R13)
BR R14
WS_DSECT DSECT
DS 18FD
NAB DS AD
AIF ('&NUM' EQ '0').NODSA
DS CL&NUM
.NODSA ANOP
&CURCSECT CSECT
MEND
Here is the generated assembler code
-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf
Of Bernd Oppolzer
Sent: Monday, November 18, 2019 2:34 AM
To: [email protected]
Subject: Re: Global character not keeping value
Hi Joe,
IMO, this should work, if you do a PRLG 30 call before the EPLG call in the
open code.
Could you please post the whole relevant part of the code (complete macro
definitions and the snippets of the open code in the correct sequence), so that
we can take a look at it?
Another suggestion: please make sure that there is no reference of &DSASUM at
another place, which may reset its value to the empty string.
Kind regards
Bernd
Am 18.11.2019 um 00:00 schrieb Joe Reichman:
> I have a prolog and eplog macros as exit and entry to program
>
>
>
> The prolog is coded as such
>
> MACRO
>
> &NAME PRLG &DSA
>
> GBLC &DSANUM
>
> &DSANUM SETC '&DSA'
>
>
>
> When used in the prolog
>
>
>
> As such
>
>
>
> AIF ('&DSANUM' EQ '').NODSA
>
> AH R11,=H'&DSANUM'
>
> .NODSA ANOP
>
>
>
> I get the value I coded e.g. PRLG 30
>
>
>
> GNERATES AH R11,=H'30'
>
>
>
> However when I used it in the EIPLOG it fails to retain its value and
> is null
>
>
>
> MACRO
>
> EPLG
>
> LCLC &CURCSECT
>
> GBLC &DSANUM
>
>
>
>
>
> As this code in the eplog is skipped
>
>
>
> WS_DSECT DSECT
>
> DS 18FD
>
> NAB DS AD
>
> AIF ('&DSANUM' EQ '').NODSA
>
> DS CL&DSANUM
>
> .NODSA ANOP
>
>
>
