IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting Housekeeping Instruction To Macro


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
yogeshpawar

New User


Joined: 01 Mar 2006
Posts: 37
Location: Sussex-UK

PostPosted: Tue May 13, 2008 6:55 pm
Reply with quote

Hi,

The Housekeeping instruction are as follows

Code:

PGM CSECT

      STM R14,R12,12(R13)

      LR R3,R15

      USING PGM,R3               <---- At the start

      LA R12,SAVE

      ST R12,8(,R13)

      ST R13,4(,R12)

      LR R13,R12
      :
      :
      :
      :
      L R13,SAVE+4                  <----- At the end

      LM R14,R12,12(R13)


and the corresponding macro instruction which I think of are

Code:

MACRO  HSKEEP &ACT=,&NAME=,&LABEL=

&LABEL CSECT

       AIF (&ACT EQ 1).FIRST

       AIF (&ACT EQ 2).LAST

.FIRST STM 14,12,12(13)

       LR 3,15

       USING &LABEL,3

       LA 12,&NAME

       ST 12,8(0,13)

       ST 13,4(0,12)

       LR 13,12

       MEXIT

.LAST  L 13,&NAME+4

       LM 14,12,12(13)

       BR 14

       MEND


But while compiling I am getting error as ASMA307E which refers to 'No active USING for operand SAVE'. SAVE is of 18 words. Do I need one more USING or am I doing something wrong? Can you please let me know?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue May 13, 2008 7:03 pm
Reply with quote

In
Code:
   MACRO  HSKEEP 1,SAVE,PGM
Where is 'SAVE' defined?
Back to top
View user's profile Send private message
yogeshpawar

New User


Joined: 01 Mar 2006
Posts: 37
Location: Sussex-UK

PostPosted: Tue May 13, 2008 7:06 pm
Reply with quote

SAVE is 18 word save area defined below at the end
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue May 13, 2008 7:13 pm
Reply with quote

yogeshpawar wrote:
SAVE is 18 word save area defined below at the end
According to your error, it is out of range of any USINGs....
Another CSECT? DSECT?
After a DROP?
More than 4k bytes away?
Back to top
View user's profile Send private message
yogeshpawar

New User


Joined: 01 Mar 2006
Posts: 37
Location: Sussex-UK

PostPosted: Wed May 14, 2008 4:12 pm
Reply with quote

Thanks for your time. It worked when CSECT statement was removed from Macro.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed May 14, 2008 6:27 pm
Reply with quote

Strange, you lost &LABEL?
How about putting the CSECT
Code:
.FIRST ANOP
&LABEL CSECT
       STM 14,12,12(13)

(I think ANOP is correct....)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts PRINTOUT macro PL/I & Assembler 0
No new posts create rexx edit Macro that edits the... CLIST & REXX 3
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top