Talked to someone looking to maybe code IBM assembler, or COBOL. So, I've coded a sample. But first, one might look at:
SPFlite.com which is an editor that looks like the ISPF editor, but is better. (and free)
Z390.org which is an IBM mainframe simulator for assembler and COBOL. (also free) To use it, you have to do SET commands to define files (ddnames) and the program you want to assemble and test. Hercules is another simulator that is popular, particularly with schools, but it only provides the instruction processor. You have to provide the operating system, and all the programs you want to use, like the assembler, linkage editor, and way more. Just start with Z390 and move up later if you need to do that. I surely don't, even though there are a couple functions that I'd like to use that are not available with Z390, but it's not worth the hassle. Not even close. You might want to read up on the SET command (in DOS) because that gives me more trouble than just about anything else (except my demented brain of late). Also, one might note that the simulator speed is something like 0.0001% of the speed of a mainframe processor. Something like 1,000 instructions per second.
I do everything on my PC. All my files are in C:\USERS\LIN\DOCUMENTS\Z390CODE\ and you'll want your name. Before you complain, I've used r13 for both base, and save area. That makes the program reuseable, but not reentrant. And I get an extra reg to play with. I use 14, 15, 0, and 1 whenever I can. Extra base registers are high. Work regs are low. I use reg-9 for BAL almost all the time. Note: TRT changes reg-2. (Yeah, didn't work as a base back when I was new.)
In the '70s I wrote a program for my boss, Mike Lanier, who was looking for something (his name??) in the 20 real DDA master file. His COBOL program locked up the '95. He told me, and I wrote something like the following. (I had to test it because there were some mistakes):
AGO .START
------ Z390 ASSEMBLE, LINK, AND GO. CHANGE ASDF TO YOUR PGM NAME ----
THE START COMMAND FOR Z390 IS:
C:\USERS\LIN\DOCUMENTS\Z390CODE\ASDF
THE FOLLOWING SET+BAT COMMANDS ARE STORED AS
C:\USERS\LIN\DOCUMENTS\Z390CODE\ASDF.BAT (BATCH EXECUTE COMMAND)
SET G=C:\USERS\LIN\DOCUMENTS\Z390CODE\ASDF
SET IN=%G%.PRN
SET OUT=%G%.OUT.TXT
BAT\ASMLG %G%.MLC TIME(1) PARM(XYLOPHONE)
BAT\EZ390 %G%.MLC TIME(1) PARM(XYLOPHONE) <== JUST EXECUTE
BAT\EZ390 %G%.MLC TEST TIME(2999) PARM(XYLOPHONE) <= EXECUETE W/ TEST
-----------------------------------------------------------
.START ANOP , THIS IS THE ACTUAL START OF THE PROGRAM.
*
ASDF START 0
YREGS
USING *,13
B STM-*(R15)
DC 17F'0'
IDLINE DC C'ASDF, V01.01, ASM &SYSDATE, &SYSTIME'
STM STM 14,12,12(13)
ST 13,4(15)
ST 15,8(13) THESE ARE USED FOR TESTING
LR 13,15 48 XYLOPHONE
L R5,0(R1) 49 XYLOPHONE
LA R2,IN 50 XYLOPHONE
BAL R9,OPENIN 51 XYLOPHONE
LA R2,OUT 52 XYLOPHONE
BAL R9,OPENOUT
LH R6,0(R5)
SH R6,=H'1' ABEND IF THERE IS NO PARM
BM ABEND
STC R6,FOUND+1 PUT STRING LENGTH-1 INTO CLC INST.
SR R1,R1
IC R1,2(R5) LOAD FIRST CHAR OF PARM
LA R2,TRTTBL(R1) AND SET UP THE TRT TABLE.
MVI 0(R2),C' '
B GET
ABEND ABEND 1 IF NO PARM, ABEND
*
PUSH PRINT
PRINT NOGEN Y'ALL REALLY DON'T NEED TO SEE DCB EXPANSION
USING IHADCB,2
OPENOUT CLC =H'0',DCBLRECL
BNE *+16
MVC DCBRECFM,DCBRECFM-IHADCB+IN
MVC DCBLRECL,DCBLRECL-IHADCB+IN
*
OPEN ((2),OUTPUT)
BR R9
*
OPENIN OPEN ((2),INPUT)
BR R9
*
CLOSE CLOSE (IN,,OUT)
BR R9
DROP 2
POP PRINT
*
DC F'0'
PUT L R0,PUT-4
PUT OUT,(0)
*
GET GET IN
ST R1,PUT-4
LA R3,0(R1)
LH R4,DCBLRECL-IHADCB+IN
LA R4,103
BCTR R4,0
SR R4,R6
LA R4,0(R4,R3)
*
LOOP LR R2,R4
SR R2,R1
CH R2,=H'256'
BL SHORT
TRT 0(256,R1),TRTTBL
BNZ FOUND
LA R1,256(R1)
B LOOP
*
TRT 0(0,R1),TRTTBL
SHORT EX R2,SHORT-6
BZ GET
FOUND CLC 2(0,R5),0(R1)
BE PUT
LA R1,1(R1)
B LOOP
*
Z BAL R9,CLOSE
L 13,4(13)
LM 14,12,12(13)
SR 15,15
BR 14
LTORG
PUSH PRINT
PRINT NOGEN
IN DCB DDNAME=IN,DSORG=PS,MACRF=GL,RECFM=FT,LRECL=399,EODAD=Z
OUT DCB DDNAME=OUT,DSORG=PS,MACRF=PM,RECFM=FT
POP PRINT
TRTTBL DC XL256'00'
*
@@PAD#0 EQU *-ASDF+4095 THIS STUFF CAUSES THE PROGRAM
@@PAD#1 EQU @@PAD#0/(4097) TO ASSEMBLE AS A MULTIPLE OF 4K
@@PAD#2 EQU (@@PAD#1*4096) BECAUSE I FIND IT USEFUL IN Z390
ORG ASDF+@@PAD#2 FOR THE PGM TO BE AMULTIPLE OF 4K
*
* DCBD DEVD=DA
*
END ASDF