ca.portal.admin

Re:Re: COBOL question

Discussion created by ca.portal.admin on Jun 9, 2009
Well, not all COBOL programs are reentrant. Many batch programs are not. Not sure if this is batch or online program.
But actually, since all Kay is looking for is a literal it is much easier to do since the literal pool is in load module regardless of whether not the program is reentrant. At least in COBOL II (where we stopped at LMC - no more development in COBOL), the literal pool can be found in the listing like this:

LITERAL POOL MAP FOR LITERALS IN THE CGT:

0002AC (LIT+0) 00124F68 00014BB3 0002585C
0002CC (LIT+32) 00124F74 000258F6 000375D5

If the literal you want to change is some unique value then it should be easy to spot in the map and you can simply use AMASPZAP to modify the load module. If however, there is specific use in the program for a certain literal, then you would need to compile the program with the LIST option, then look at the pseudo assembler code to figure which literal you want to zap. For example:

We want to change 'CPSBP322' to 'KAYBP322' for some reason in this bit of code:

003279 115300 MOVE 'CPSBP322' TO PROGRAM-NAME.

We then find line 3279 in the pseudo assembler:


003279 MOVE
004FD0 D207 85B8 7C0A MVC 1464(8,8),3082(7)
(BLW=713)+1464 PGMLIT AT +6766

We would then know that the offset that compiler is using for this literal is at PGMLIT + 6766

Then we find that literal in the literal pool:
001D0C (LIT+6752) E2C2D7F4 F3F3C3D7 E2C2D7F4 F3F2C3D7
E2C2D7F3 F2F2E2D6 D9E3E2C740E2E8 |SBP433CPSBP432CPSBP322SORTMSG SY

Then the VER and REP cards would be:
VER 001D1A C3D7E2
REP 001D1A D2C1E8

Dan Miley
Lockheed Martin

Outcomes