where should I put my macro program?

High Level Assembler(HLASM) for MVS & VM & VSE

where should I put my macro program?

Postby helen2000 » Mon Mar 29, 2010 2:28 am

Hi All,

this is my first time to code assmbler program. I want to transfer a assmbler program from pc370 to mainframe/mvs.
My comiler JCL told me it didn't recoganize these instruction. such as" WTO, BEGIN, RETURN" etc. finally, I found they
are macro instruction. the docment told me should put all macro into Source Library. could anybody tell me which source
I should put these macros in?

Posts: 85
Joined: Sat Aug 08, 2009 9:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: where should I put my macro program?

Postby dick scherrer » Mon Mar 29, 2010 2:41 am

Hi Helen,

There should be standard assembler jcl on the mainframe you are using. This standard jcl should already name the needed "macro library". Suggest you talk with someone who supports the assemble/link process and learn the name of the standard assembler process on that system.

Also, many organizations do not allow developers to issue WTO commands. You may want/need to change the code to write the data to a file rather than issuing WTO. . .
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: where should I put my macro program?

Postby Schubie » Wed Jul 21, 2010 9:26 am

System macros such as SAVE, OPEN, CLOSE... etc are located in SYS1.MACLIB
This library is usually pointed to by the SYSLIB DD card i.e. //SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR in the assembler procedures which are normally maintained in SYS1.MACLIB
Other macro libraries can be concatenated behind SYS1.MACLIB and any macros which you, yourself, may code should be stored there
It is usual practice to limit access to SYS1.MACLIB as 'Read Only' to all except those handling the maintenance of the system
If a bug is located in a program product which simply cannot be fixed, it becomes a 'feature'. (IBM)
User avatar
Posts: 10
Joined: Wed Jul 21, 2010 9:16 am
Location: Blue Ridge, GA USA
Has thanked: 0 time
Been thanked: 0 time

Re: where should I put my macro program?

Postby steve-myers » Thu Jul 22, 2010 12:16 am

Until you know your macro does not have any errors, put it in-line in your source before the first time it's used. It's much easier to correct problems this way. After your macro works correctly, then put it in a library that you put in the SYSLIB concatenation for the Assembler.
Global moderator
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Return to Assembler


  • Related topics
    Last post