The init is run "once per script execution", not just once per day. In this case it's a matter of replacing over 100 instructions with 3. Those 100+ instructions are executed every time any automation process is executed that requires a script to be used, which can easily be hundreds of thousands of times per day, so the savings is substantial when you look at it from that perspective. Anything that can be done to the initial housekeeping of the automation script processing to save time and code, even small bits is a good thing, especially considering the multiplication factor of how many times it gets used. In this case it's a pretty big deal. Plus, in this case it gives back some addressable code space in the program. Automation has to start and mainly run in 31bit, and while we go in and out of 64bit depending on what is being done, we are "mostly" limited to 31 bit addressing with the base regs.
Our automation suite is VERY low impact CPU-wise, and this is one of the areas that has bothered me for a while. Housekeeping stuff always sort of sucks to have to do, but if you don't then bad things happen, but that doesn't mean that you shouldn't do it as efficiently as possible. It may not seem like much, and it's not very measurable all by itself, but I think the overall savings is good. Brian -----Original Message----- From: [email protected] <[email protected]> Sent: Monday, December 1, 2025 5:17 AM To: IBM Mainframe Assembler List <[email protected]> Cc: Brian Westerman <[email protected]> Subject: Re: quick way to initialize Packed fields? Since the initialization is performed only once, how much time is this likely to take? If each instruction took 1 microsecond, that's a total of 104 microseconds. Could you measure it? On 2025-11-30 14:34, Brian Westerman wrote: > Hi, > > I have a program in which I have 104 PL4 fields tht are used for > various counters, and when the program starts it spends a significant > amount of time initializing all of those fields to zero. > > we used to use ZAP field,=PL4'0' and then I found an entry (on the > web) that said it would be "slightly" faster to use MVC, so I changed > it to > 104 MVC filed,=PL4'0'. > > Is there not a quicker way to do this? I know that I can ripple the > first byte of a field for up to 256 bytes with a single instruction, > but can that same type of thing be done with a 4 byte packed field? > > If not, is there a quicker way to initialize these fields without > doing each one separately? > > Thanks for any tips. > > Brian
