M.S.S. Inc LOGO FREE HLASM Source Code

McColley Systems Software Inc.
If it's assembler, WE CAN HELP!
"Elegant Solutions for Your Processing Needs"


Home   Shared Spool Mods   ESSM!   Tip of the Month   Articles   Free Source   LINKS   ASSEMBLER SURVIVAL GUIDE   ABOUT US  


Welcome, I truly hope you find a few free snippets of code here that will help you! Take as many pieces of Assembler code ( HLASM ) as you want -
I'll write more!

Here are the source offerings. Some are assembler source snippets, some are macros that you can use in your day to day coding, some are complete programs. I hope they help. There should be some trick, or tip or assembler macro or assembler code source that will help you in your programming efforts. In addition to the source, and what each piece will specifically do for you, read the source for general coding techniques - there should be something here for everyone.

Most of the small source pieces are simply presented in TXT format and you can simply use cut and paste to snag a copy. The larger pieces, the full programs are setup with downloadable files, simply save them to your PC and use your favorite file transfer method to get them to the mainframe - most 3270 emulators have a file transfer mechanism built in. Entire packages are always placed in TSO XMIT format.

LSPACE - an assembler utility program to display (ISPF panel display) free and used space totals for all DASD volumes

SHOWME - a combination of panel modification, ISPF cmd table update, and code that allows you to add a descriptive comment to your pds (or PDSe) members, and display those comments on the ISPF member display lists instead of ISPF statistics. If you move or copy the members the description follows the member, no separate INDEX or COMMENT member is used.

#STACK & #UNSTACK - my macros used to enter an exit subroutines using a stack area to save the linkage register in.

Four really trivial macros - #BLANK   #ZERO , #FILLC , and #FILLX - the major advantage in using any of these four macros is simply to eliminate typing. You probably already know what they do -
    #BLANK   is passed the name of a field which is filled with blanks.
    #ZERO   is passed the name of a field which is filled with hex zeros.
    #FILLC   is passed the name of a field, and a single character - the field is filled with the character.
    #FILLX   is passed the name of a field, and two hex digits - the field is filled with the hex value.
They are limited to working with fields that are 255 bytes or less in length, and they have no error checking. They are purely to save my typing time! If you try to use any of my assembler programs you will probably need one or more of these four simple macros.

#ENTRY and #EXIT - my macros used to enter and exit a csect, they handle, equates, dynamic save areas, and working storage areas on entry, and clear them up (release them) on exit - what you would expect from a good set of entry / exit macros.

IPLINFO - This little assembler (hlasm) utility program gathers basic IPL information, saves it in a dataset, and compares it to previous IPL history. A history of several IPLs is kept.

HISTORY - there are several versions of this running around - mine, when used as a TSO exec will locate a program name in LPA, or LINKLIST, or STEPLIB, etc. and try to display any eyecatcher at the top of the module as well as where it came from, what library that is.

numdec and numhex - a couple of ISPF edit macros that will replace repetitive strings with sequential decimal numeric values, or sequential hex values. These are great for those of you that need to maintain or create tables of ..... DASD addresses, etc. They can save hours of typing and copying.

POLPUNCH - a program (and jobstream) used to punch policy statements directly from your CDS - make sure you have a current deck to modify your policy with every time - punch a fresh one.

JES2 exit to prevent spool purge - everyone who doesn't have one of these, needs one. It prevents the operator from purging jobs by range, i.e. $PJ(1-99999) (don't try it, it will wipe your spool out!).

ITWAIT - a utility program in assembler (hlasm) that simply goes into a wait for a variable number of hours, minutes, seconds, tenths, and hundredths of a second, as specified in the parm value. This is frequently useful in testing. Note - this program really does go into a wait - it does not 'check' every few seconds to see if it can 'wake' up - it waits for the entire time specified in the passed parm value.

The time is specified in the parm value and a full 8 characters must be passed - i.e.
PARM='00000100' (WAITS FOR 1 SECOND)
PARM='03250200' (WAITS 3 HOURS, 25 MINUTES, AND 2 SECONDS)
PARM='12000000' (WAITS 12 HOURS)
Click HERE for sample JCL.

ISITUP - a program that tests to see if the job or stc name passed in the parm is running - you get one return code if it is, another if it is not - good for simple automation.'

TILLDOWN - an assembler (hlasm) program that tests to see if a given program name passed as a parm, is running, if it is not, it ends, if it is running, it waits until the named task ends, and then this pgm will end as well. Good for crude scheduling.

A JES2 exit written in assembler to prevent runaway print jobs from filling up the spool - once a job has reached it's excession limit, you can use this exit to force someone to look into the potential problem and allow, or purge run-away print jobs.

Monitor spool purges - these two exits will monitor all spool job purges. Currently if you go into SDSF, and use the '?' line command against a job in the held or output queue, you will get a dataset list of print output Softwares for the job - delete one you don't care to keep, and then look for the msg in the log or SMF that a deletion occurred - YOU WONT FIND ANY! We were told when an errant program was erroneously deleting output Softwares, that this could not be tracked... so we did it anyway... take a copy of the code if you wish.

More to come as I think of them, and consider whether they may be useful to you or not

Remember -

Feel free to contact us via This LINK if your email program is on this system,

Stephen.McColley@MVSProgrammer.com


Last updated August 2011 - copyright © 2011 McColley Systems Software Inc.
Return to top of Page.