I am extracting business rules from a COBOL program to write an equivalent Java program. My COBOL program is calling an assembler program with 3 parameters. I am not very good at assembler.
I am not able to understand the functionality of the assembler program. Could some one explain me the logic or help me with pseudo code. Here is the code.
NAME DS CL8
E11 DS F
L11 DS F
LOADING STM 14,4,12(13)
MODLOAD LOAD EPLOC=NAME
MODELES XR 2,2
CHKMOD24 TM 8(3),X'80'
LOADOK12 NOPR 0
CALLING LM 14,1,12(13)
KEY4 DC F'4'
DELETEE STM 14,12,12(13)
DEL_OKAY DELETE EPLOC=NAME
DELETEOK XC 8(8,3),8(3)
The name of the idiot who wrote the COBOL program? I mean, we only have 30 characters for data-names and in RET1 and RET2 they've used four more than absolutely necessary. What a waste of typing.
Of course, now the names are no real help in understanding what the program does. But that is minor, a few hours or days wasted later, whilst they managed to implement 0.2s more quickly.
Someone with IMS knowledge may be able to say something as to why, but it seems to be a program used to load, if necessary, then call, and, separate entry-point, so at some other logical point, delete - programs.
I think it is something local to your site ("LOADING" is a silly name for a program). Ask around there.
This may be a throwback to older times (Language Environment does this stuff from for COBOL CALLs) and may not be required at all.
As well as asking around, see if anyone IMS turns up here, or someone to fill in the details on the ASM.
Presumably you already have details on how your Java is going to run and interact successfully. I don't think you'll be needing a "loader", but if you do, someone has presumably mentioned it to you or documented it somewhere along the way in the design.
Joined: 30 Nov 2013 Posts: 797 Location: The Universe
Well, there are other issues.
As written, the program will not assemble. I very much doubt the program, in the form it was presented by satish.ms10 is actually used.
As written, it seems the program expects register 3 to be pointing to the ARG01 structure. It is totally foolish to expect anything like this in compiled code. Again, I very much doubt the program, in the form it was presented by satish.ms10 is actually used.
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
The LA instruction of a value into R1 just prior to the ABEND is too large. Max value for an LA is 4095. Change the LA to an LHI (max=32767) or an LAY (max=524287). Other than that, I agree this program needs further scrutiny and resolve.