Your base register setup is incorrect. Assuming the call to the entry point establishes register 15 correctly, you have two "correct" ways to establish your base register.
Option 1 - which I usually use since the displacement values in the assembled instructions will assemble to the offset value -
Option 2 - This is the correct way to do what you tried -
Remember that the USING Assembler instruction is a promise to the Assembler that you will have a specific address in a specific register. BUT you have to put the address in the register.
The STM 14,12,12(13) instruction you used is perfectly OK, but the program identification in the SAVE macro has two advantages.
- When the system dump program formats the save area chain, it will place the identifier in the SAVE macro in its listing.
- It makes it easier to find your program in a storage dump. I usually use something similar to this.
Now I have a program identifier, and the date and time step in the identifier is a way to verify the program in the dump matches the program in the listing I'm using, which is often quite useful.
SAVE (14,12),,'MYPGM &SYSDATE &SYSTIME'
Back in the days when I did product support for a living, one version of the product used the equivalent of option 2 as it normal entry setup, which I found annoying. The other version of the product used the equivalent of option 1 as its entry setup.
A hint about using code tags here. The available width in the code tags is quite limited; assembler listings in the code tags are just too wide for it to work well.