This is the simple code I wrote to teach myself little Assembler .
All the code is doing is copying the data in variable TCH to PS Dataset .
When I am running this program job abends with S0C1 abend .
If any one can help me to point me what mistake I am doing ?
I tried to do little dump analysis of SYSUDUMP I am getting lost when PUT macro executes ( ICM instruction executes within macro ) .
TITLE 'TEST DATASET PROGRAM'
SAVE (14,12) SAVING THE STATE OF REGISTERS
BASR 12,0 ESTABLISH BASE ADDRESS
USING *,12 ESTABLISH BASE ADDRESS
*PRACTISING ASSEMBLER MACROS ON DATASET
OUTX DCB DDNAME=MYOUT,DSORG=PS,MACRF=(PM),RECFM=FB,LRECL=80, X
*RETURN CONTROL TO OS
*VARIABLES AND SAVEAREAS
Joined: 06 Jun 2008 Posts: 8449 Location: Dubuque, Iowa, USA
SHARE has run an Assembler Boot Camp several times during their annual conference. Google assembler boot camp for more information. There are several sessions during the week and they will give you at least a basic understanding of z/OS assembler.
The DCB is a rather large data area. Part of it is supplied by your program in the DCB macro, the remainder is filled in when you open the DCB.
Those instruction are pretty self explanatory.
To fully understand these instructions we must go back to history.
OS/360 was supposed to run in a system with 32K bytes of storage. Now this is hard to comprehend in a day when the desktop workstation I'm using to compose this has 6 gigabytes of storage, but in 1965/1966 32K was a BIG machine. The programmers were fighting for every byte of storage. The OS/360 PUT macro was
The storage byte at offset 48 in the DCB was used for something - I no longer remember what it was used for and it's not important. The 24-bit address of the code that processes a PUT request was (and still is) filled in by OPEN in bytes 49 through 51. In System/36 only the low order 24-bits of register 15 were used for the branch address in the BALR; the high order 8 bits were ignored. In the early 1980s when IBM provided for more than 16 meg of storage the old code would no longer work, so IBM changed it to SLR/ICM/BALR to make sure the higher order byte of register 15 was 0 before it executed the BALR instruction.