First thing to wonder about is: "Has IBM upgraded the PL/AS(current name?) compiler to emit Relative and Immediate instructions?". Most of the BCP is supposedly written in PL/AS, not HLASM. Second, for those modules which are written in HLASM, is it cost effective to IBM to systematically update the source from the older instructions? Why would it be? The new instructions may (or may not) be less resource efficient that the older versions.I doubt that many are more efficient (LHI being more efficient seems likely). Many of the R&I instructions are longer than the corresponding Base+Displacement instruction. The simpliest thing for IBM would be to use the IEABRCX macro to change all the branch instructions to branch relative instructions. But you can't do that type of OPSYN method to do something like replacing the LA with an LARL. So replacing LA with LARL would require looking at every LA instruction to see if it could be replaced by an LARL. The same with replacing selecte! d L and LH with LHI, which would verifying that the value being loaded is indeed never modified. And I don't see a general way to do it if they are inside a macro. And an LARL may not be the best idea simply because it is 6 bytes instead of the LA instruction's 4 bytes. So, at the very least, it will take up more space in the I-cache hardware. Other immediate instructions may also require more bytes that the replaced instruction. So, IMO, a command such as "Replace all base+displacement instructions in a program with the corresponding R&I instruction, whenever possible." is not a good idea.
IMO, the only time to use a relative instruction is in "baseless" code. Only use "baseless" coding when you are either out of registers or you need too many base registers due to the size of the program. Which, in HLASM programs, usually means the program is too big and should be split up somehow. Again, the only time to use immediate instructions is when the value is a constant and will fit into a halfword. Why a halfword? Because the LHI is the same number of bytes as the LH or L instruction, taking up the same I-cache space. And because the immediate instructions to load a fullword are larger than the base+displacement load instruction, and so use more I-cache space. Space which may be better spend buffering more instructions and let the D-cache hold the value instead of the I-cache holding the equivalent of the instruction and data, and not using the D-cache. This is especially true if there are two or more immediate instructions in the I-cache that are loading the same value. In this case, assuming the duplicate instruction is something like "L r,=F'10'", the F'10' would be held in the D-cache and so be likely be used almost as fast, if not equally fast, as it would be by being encoded in the instruction in the I-cache. However, I will freely admit that I use R&I instructions in preference to B+D instructions in most of my HLASM programs. Oh, and one other reason to use at least one Branch instruction in your program instead of a Brance Relative. If the start of a program starts with the sequence: USING *,15 B AROUND DC C'some character string' AROUND DS 0H Then the SYSUDUMP will print "some character string" in the save area trace portion of the dump. In most cases, this works because GPR15 points to the B instruction. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of Miklos Szigetvari > Sent: Thursday, April 12, 2012 9:16 AM > To: [email protected] > Subject: Modernizing the BCP code ? > > Hi > > We try to modernize our code here, with relative instructions, long > displacements , immediate s etc etc > What about the control program ? > Just got some REXX IRXINIT dumps, and seems to me the code > is not very > modern. > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN

