>I don't think you can multiply or divide a relocatable symbol. Right. But you can add a constant value to a relocatable symbol. The OT's original expression was ((*+255)/128)*128. The * is a relocatable symbol. *+255 is still relocatable, since 255 is constant. But *-START, as you suggested, is no longer relocatable, since START would also be relocatable symbol if it were the label on a CSECT statement, e.g., because the difference between two relocatable symbols is considered to be a constant value even though each of the two terms is relocatable. The sum of a relocatable and a constant is still relocatable. But the sum of two relocatables cannot be evaluated. Thus *-START+255 is a constant, that constant divided by 128 is still a constant, and this last constant multiplied by 128 is still a constant. The final code would look something like this: START CSECT ... SPACE EQU ((*-START+127)/128)*128 I used 127 because the OT wanted to round the length to a multiple of 128. DS (SPACE)X Reserve enough space to force 128-byte boundary alignment DS 128X OT wanted 128 more bytes after the rounding The same technique can be used to force alignment on any given boundary, whether a multiple of 2 or not. e.g., SPACE EQU ((*-START+36)/37)*37 DS (SPACE)X will generate enough slack space to force the module length to be an integral multiple of 37 (if that's what you want). Bill Fairchild ----- Original Message -----
From: "Bill Planer" <[email protected]> To: [email protected] Sent: Thursday, January 23, 2014 2:09:53 PM Subject: Re: Force module to a length I don't think you can multiply or divide a relocatable symbol, which the first * is. I think the following would work: SPACE EQU ((*-START+255)/128)*128 Where START is a label for the first location of your module or the CSECT name. Bill Planer -----Original Message----- From: Blaicher, Christopher Y. Sent: Thursday, January 23, 2014 14:55 To: [email protected] Subject: Force module to a length I am sure I have done this in the past, but a senior moment has kicked in ... I want to round a module to a multiple of 128 bytes and I want at least 128 free bytes at the end of the module. I tried putting this at the end of the code and get the following with this error. 0 5303 SPACE EQU ((*+255)/128)*128 ** ASMA032E RELOCATABLE VALUE OR UNRESOLVED SYMBOL FOUND WHEN ABSOLUTE VALUE REQUIRED - ((*+255)/128)*128 Any ideas where I went wrong? Chris Blaicher Principal Software Engineer, Software Development Syncsort Incorporated 50 Tice Boulevard, Woodcliff Lake, NJ 07677 P: 201-930-8260 | M: 512-627-3803 E: [email protected]
