• Want program that does nothing!

    Author
    Topic
    #401773

    I may be about twenty years late with this request, but on rare occasions I want temporarily to replace a program (probably one invoked by a BATch file fanfare!) with an EXE file which does nothing but run and terminate immediately. Just like IEFBR14 did on olde IBM mainframes (hi Big Al! *).

    Does anyone have something in their collection? I’d prefer an EXE rather than a COM file…

    Thanks!

    John

    * Al — do you remember about the hapless programmer who removed the SR 15,15 instruction from in front of the BR 14 instruction, to “save disk space”?!

    Viewing 9 reply threads
    Author
    Replies
    • #794105

      Somewhere I still have a copy of QB45 that could be used to create .exe’s.
      I’m happy to dig it out and knock up a do-nothing application if you think that would give you what you want…..?

      • #794111

        Leif

        I think I used to have a copy of QB45 “somewhere” also… on an IBM PS/2 model 80 — but the hard disk probably died about ten years go!

        • #794831

          Try these courtesy of QB45!

          DoNowt.exe contains a single REM line
          JustBeep.exe has a single BEEP line

        • #794832

          Try these courtesy of QB45!

          DoNowt.exe contains a single REM line
          JustBeep.exe has a single BEEP line

      • #794112

        Leif

        I think I used to have a copy of QB45 “somewhere” also… on an IBM PS/2 model 80 — but the hard disk probably died about ten years go!

    • #794106

      Somewhere I still have a copy of QB45 that could be used to create .exe’s.
      I’m happy to dig it out and knock up a do-nothing application if you think that would give you what you want…..?

    • #794107

      John

      This is the closest I can think of at the moment – I just happened to be using it when I saw your request. It does “almost nothing”, but if this “almost” is too much for your purposes, you could write & compile a tiny C program that really does nothing:

      int main() {
      return 0; }

      Alan

      • #794113

        Thanks, Alan!

        I have no C compiler or linker, and have never programmed in it!

        What was wrong with
        SR 15,15 Clear return code register 15
        BR 14 Return to the operating system

        • #794129

          I’m guessing you’ve used DEBUG before though, being a “batcher”. You could generate a .COM program that does nothing, then use COM2EXE.EXE to make your .EXE.

          What’s wrong with registers and branching and all that asm? It brings back the headaches suffered in CS101 or whatever it was grin.

          Alan

          BTW, I could make the .EXE for you, once I get my C compiler up… but you might be on a time constraint.

          Edited – So being conscious of your potential urgency here it is.

          • #794213

            Alan

            I didn’t actually need to do nothing urgently (!!) but thank you very much indeed!

            I could have done the same thing with a COM file in about half a dozen bytes, but EXE’s compiled with C must need to be at least 3500 bytes long!

            (I’m not going to complain that “your program doesn’t do anything”!!)

            • #794235

              May I ask why one would want a program “to do nothing?” scratch What does one achieve by using it? confused
              thankyou smile

            • #794273

              Right…

              Embedded deep within a BATch file I have a program DOESNASTYTHINGS.EXE

              I want to test out all other parts of the BATch file, and normally I would put an ECHO command in front of the DOESNASTYTHINGS, which means it just writes a line to the Command Prompt console, and doesn’t actually run the EXE file

              However, in this instance I don’t want to change the BATch file, not even a little bit, so I rename DOESNASTYTHINGS.EXE to SKITTERBUG_FOR_PRESIDENT.EXE (!), and copy NOTHING.EXE to DOESNASTYTHINGS.EXE

              So I can now run the BATch file without worrying about the consequences from the “real” DOESNASTYTHINGS.EXE…

              QED!

            • #794309

              … but wouldn’t we end up with Skitterbug as President? Hey I’d vote for her!

            • #794803

              Bowlie

              We’d only end up with Skitterbug_for_President if we executed her! evilgrin

              John

            • #795400

              [indent]


              We’d only end up with Skitterbug_for_President if we executed her!


              [/indent]
              shocked yikes sad bummer crybaby crybaby nope
              I would rather you stay with just “doing nothing”!!!! I am begging of you, please, don't do anything!

            • #795401

              [indent]


              We’d only end up with Skitterbug_for_President if we executed her!


              [/indent]
              shocked yikes sad bummer crybaby crybaby nope
              I would rather you stay with just “doing nothing”!!!! I am begging of you, please, don't do anything!

            • #794804

              Bowlie

              We’d only end up with Skitterbug_for_President if we executed her! evilgrin

              John

            • #794310

              … but wouldn’t we end up with Skitterbug as President? Hey I’d vote for her!

            • #794524

              I have read your answer a dozen times and I guess it is way over my head. The only thing I can gleam from this is that you ended up with an executable mixed into your BATch file somehow and now you want to be able to run the whole thing without the .exe actually doing “its thing?” How would DOESNASTYTHINGS have gotten in the mix of things in the first place? I am glad that SKITTERBUG_FOR_PRESIDENT.EXE would help!! I’d make history being the first female actually attaining that position!! Wow!! I appreciate Bowlie’s vote of confidence!!

              I also looked up QED and found a slew of explanations for those three letters but being the ‘learned man” that you are, I figured you were alluding to the following: Quod Erat Demonstrandum (Latin: Which Was to Be Demonstrated)

              I don’t believe I will ask any more questions about stuff I just don’t understand because even the answer to my question left me in the dark!!

              coffeetime I need one now!!

            • #794572

              Think of putting a fake nipple (can’t remember what they’re called in the US – “teat” or “dummy” come to mind) in a baby’s mouth. John’s “program that does nothing” is one of those.

              He just wants to make sure that everything elese is running correctly in his computer program before he puts a breast (or a bottle) in the baby’s mouth.

              HTH

            • #794604

              We use to call them “pacifiers”! smile I believe I understand – but after your descriptive explanation, I know I won’t ask any more questions!! grin I am not sure what the next example might be!! laugh

            • #794605

              We use to call them “pacifiers”! smile I believe I understand – but after your descriptive explanation, I know I won’t ask any more questions!! grin I am not sure what the next example might be!! laugh

            • #794573

              Think of putting a fake nipple (can’t remember what they’re called in the US – “teat” or “dummy” come to mind) in a baby’s mouth. John’s “program that does nothing” is one of those.

              He just wants to make sure that everything elese is running correctly in his computer program before he puts a breast (or a bottle) in the baby’s mouth.

              HTH

            • #794711

              Just as an example, John’s batch file might call on DELTREE to delete a whole folder and sub-folders. During testing, he may not want to have to keep recreating this folder structure and its files, so he renames his “nothing” program to DELTREE and therefore doesn’t need to keep changing (maybe multiple edits) the batch file itself. It’s probably more involved than that though – this is just a trivial example.

              Alan

            • #794805

              Alan

              That’s a GOOD example – I was desperately racking what is left of my brains to explain why I need such a program!

              John

            • #794926

              So you actually want a program that does nothing, don’t have a known need for it, and ideally, want it to be zero bytes in size. I think you might find one hiding somewhere between adjacent sectors. grin More seriously, you have prompted me to get back into the realms of DOS debug. The smallest .COM program I can generate is 2 bytes. The corresponding minimum .EXE size is 34 bytes. Here they are, ironically zipped up to a size of 262 bytes… talk about software bloat, eh?

              Alan

            • #794927

              So you actually want a program that does nothing, don’t have a known need for it, and ideally, want it to be zero bytes in size. I think you might find one hiding somewhere between adjacent sectors. grin More seriously, you have prompted me to get back into the realms of DOS debug. The smallest .COM program I can generate is 2 bytes. The corresponding minimum .EXE size is 34 bytes. Here they are, ironically zipped up to a size of 262 bytes… talk about software bloat, eh?

              Alan

            • #795015

              Alan

              If your .COM program is two bytes, then you haven’t set the errorlevel to zero!!

              (What is the “ironic ZIP” program of which you speak?!)

            • #795308

              Ah! So you do actually want it to do something grin. Maybe this will suit better – it actually does just one thing – returns an errorlevel of zero. I’m unsure of how you want to use this, but I’m wondering why you don’t try to build some simple utility into it. For instance, if you had it return a weirdo errorlevel, like 123, then you could test for that code in your batch file and fire an echo like “Test mode – this is not the real XYZ program.” Or maybe use it to set an environment variable indicating you are in “test mode”?

              Since my debug skills are rusty to say the least, here is the routine I used:

              MOV AL,00    ;Put 00 in register AL for ERRORLEVEL
              MOV AH,4C    ;Terminate with code
              INT 21       ;Run it
              

              Alan

              The “irony” of the ZIP file is that zipping is usually meant to compress things. This one compressed 2 + 34 bytes “down to” 262 bytes.

            • #796490

              So how come your 5-byte (correction: 6-byte) code ended up as a 14-byte COM file? Such profligate code bloat!! Must’ve learnt how to code in the M$ school of programming barf.

              You should be able to do it with only 5, as per the attached (Hint: load your file with debug, set RCX to 6, then W to get a 6-byte version). Also included is a 7-byte BEEP.COM & 2-byte NOTHING.COM, neither of which set ERRORLEVELS.

              Cheers

              Cheers,
              Paul Edstein
              [Fmr MS MVP - Word]

            • #796568

              Well, I make it 6 bytes actually, the way I wrote it in the message. But you’re right – that’s the size of the COM file I just reproduced. I really dunno how it “blew out” to 14… must have been me fiddling somehow, or maybe my 8 byte virus code has been discovered evilgrin. I think that, strictly, it should terminate with a call to INT 20 too, which would bloat it out to 8 bytes. Rather than keep posting these (if you’re still out there John) it might be easier to post the debug commands so you can roll your own:

              C:...>debug
              -a 100
              118F:0100 mov al,7b
              118F:0102 mov ah,4c
              118F:0104 int 21
              118F:0106 int 20
              118F:0108
              -n err123.com
              -rcx
              CX 0000
              :8
              -w
              Writing 00008 bytes
              -q
              

              And this one is 8 bytes. It returns errorlevel 123, corresponding to the 7b. You could make it return zero by replacing the 7b with 00.

              Alan

              Edited – Apparently, according to Mr. DOS, I should contact you! Your program generates the following on my machine:
              “Your program caused a divide overflow error.
              If the problem persists, contact your program vendor.”

              Edited again – Macropod reminded me that the INT20 was superfluous after service 4C runs, so scrub that line out… down to 6 bytes now with errorlevel.

            • #796989

              This is amazing scratch

              one of the longest threads in the software forum , and all because somebody wants a program to do nothing!!.

              Is there some kind of moral here? The less you ask for the more you get? I’ve seen religions built up out of less smile

            • #796569

              Well, I make it 6 bytes actually, the way I wrote it in the message. But you’re right – that’s the size of the COM file I just reproduced. I really dunno how it “blew out” to 14… must have been me fiddling somehow, or maybe my 8 byte virus code has been discovered evilgrin. I think that, strictly, it should terminate with a call to INT 20 too, which would bloat it out to 8 bytes. Rather than keep posting these (if you’re still out there John) it might be easier to post the debug commands so you can roll your own:

              C:...>debug
              -a 100
              118F:0100 mov al,7b
              118F:0102 mov ah,4c
              118F:0104 int 21
              118F:0106 int 20
              118F:0108
              -n err123.com
              -rcx
              CX 0000
              :8
              -w
              Writing 00008 bytes
              -q
              

              And this one is 8 bytes. It returns errorlevel 123, corresponding to the 7b. You could make it return zero by replacing the 7b with 00.

              Alan

              Edited – Apparently, according to Mr. DOS, I should contact you! Your program generates the following on my machine:
              “Your program caused a divide overflow error.
              If the problem persists, contact your program vendor.”

              Edited again – Macropod reminded me that the INT20 was superfluous after service 4C runs, so scrub that line out… down to 6 bytes now with errorlevel.

            • #796491

              So how come your 5-byte (correction: 6-byte) code ended up as a 14-byte COM file? Such profligate code bloat!! Must’ve learnt how to code in the M$ school of programming barf.

              You should be able to do it with only 5, as per the attached (Hint: load your file with debug, set RCX to 6, then W to get a 6-byte version). Also included is a 7-byte BEEP.COM & 2-byte NOTHING.COM, neither of which set ERRORLEVELS.

              Cheers

              Cheers,
              Paul Edstein
              [Fmr MS MVP - Word]

            • #795309

              Ah! So you do actually want it to do something grin. Maybe this will suit better – it actually does just one thing – returns an errorlevel of zero. I’m unsure of how you want to use this, but I’m wondering why you don’t try to build some simple utility into it. For instance, if you had it return a weirdo errorlevel, like 123, then you could test for that code in your batch file and fire an echo like “Test mode – this is not the real XYZ program.” Or maybe use it to set an environment variable indicating you are in “test mode”?

              Since my debug skills are rusty to say the least, here is the routine I used:

              MOV AL,00    ;Put 00 in register AL for ERRORLEVEL
              MOV AH,4C    ;Terminate with code
              INT 21       ;Run it
              

              Alan

              The “irony” of the ZIP file is that zipping is usually meant to compress things. This one compressed 2 + 34 bytes “down to” 262 bytes.

            • #795016

              Alan

              If your .COM program is two bytes, then you haven’t set the errorlevel to zero!!

              (What is the “ironic ZIP” program of which you speak?!)

            • #794806

              Alan

              That’s a GOOD example – I was desperately racking what is left of my brains to explain why I need such a program!

              John

            • #795396

              Okay, I will ask another question – this process still isn’t making sense to me confused – perhaps because I don’t have extensive background in any programming language except a semester of BASIC and some DOS. So if this program actually does nothing, how does the programmer know that his batch file will do what he wants? While running the “do nothing” program, are errors being exposed? I can see why it would not be acceptable to have the “do nothing” program actually do something, because it would indeed be a headache to put back all that was changed!
              thankyou for your patience!

            • #795410

              I don’t know exactly what John’s doing, so can’t comment on that particular situation. All I can do is dream up some possible scenarios:

              An accounting program loops through a whole bunch of (actual) accounts and generates reports. Part of its function is to update the balances by adding any interest due. This is the kind of thing you’d want to be sure to do only once, in the final analysis, lest the account holders be credited with extra $$$ each time the program is tested. So AddInterest() is the kind of function/ program you might want to replace with a dummy. You would have to have tested and proven it independently on dummy data and be confident it worked in its own right.

              The program might call on another “program” to output information in a specific manner. This print function might be used all over the place and directly generate print on paper. Rather than find all these locations and “comment out” its actions, then have to uncomment them back in (a dangerously errorprone approach) it might be better to replace the SendToPrinter() program with a dummy, to avoid generating hardcopy each time the main program is tested.

              In essence, you have to be confident that the program you’re “neutralizing” works properly in its own right, and that neutralizing it won’t interfere with you verifying the rest. This is why I suggest a dummy program that returns something unique to the “parent” batch file, so that it’s easy to see whether or not it has been run when it was supposed to have been.

              Alan

            • #796263

              thankyou Alan, I have learned a bit and I am glad that the loungers have patience with my crazy questions! What may seem simple to many can be quite confusing to some!! yep

            • #796264

              thankyou Alan, I have learned a bit and I am glad that the loungers have patience with my crazy questions! What may seem simple to many can be quite confusing to some!! yep

            • #795411

              I don’t know exactly what John’s doing, so can’t comment on that particular situation. All I can do is dream up some possible scenarios:

              An accounting program loops through a whole bunch of (actual) accounts and generates reports. Part of its function is to update the balances by adding any interest due. This is the kind of thing you’d want to be sure to do only once, in the final analysis, lest the account holders be credited with extra $$$ each time the program is tested. So AddInterest() is the kind of function/ program you might want to replace with a dummy. You would have to have tested and proven it independently on dummy data and be confident it worked in its own right.

              The program might call on another “program” to output information in a specific manner. This print function might be used all over the place and directly generate print on paper. Rather than find all these locations and “comment out” its actions, then have to uncomment them back in (a dangerously errorprone approach) it might be better to replace the SendToPrinter() program with a dummy, to avoid generating hardcopy each time the main program is tested.

              In essence, you have to be confident that the program you’re “neutralizing” works properly in its own right, and that neutralizing it won’t interfere with you verifying the rest. This is why I suggest a dummy program that returns something unique to the “parent” batch file, so that it’s easy to see whether or not it has been run when it was supposed to have been.

              Alan

            • #795397

              Okay, I will ask another question – this process still isn’t making sense to me confused – perhaps because I don’t have extensive background in any programming language except a semester of BASIC and some DOS. So if this program actually does nothing, how does the programmer know that his batch file will do what he wants? While running the “do nothing” program, are errors being exposed? I can see why it would not be acceptable to have the “do nothing” program actually do something, because it would indeed be a headache to put back all that was changed!
              thankyou for your patience!

            • #794712

              Just as an example, John’s batch file might call on DELTREE to delete a whole folder and sub-folders. During testing, he may not want to have to keep recreating this folder structure and its files, so he renames his “nothing” program to DELTREE and therefore doesn’t need to keep changing (maybe multiple edits) the batch file itself. It’s probably more involved than that though – this is just a trivial example.

              Alan

            • #794525

              I have read your answer a dozen times and I guess it is way over my head. The only thing I can gleam from this is that you ended up with an executable mixed into your BATch file somehow and now you want to be able to run the whole thing without the .exe actually doing “its thing?” How would DOESNASTYTHINGS have gotten in the mix of things in the first place? I am glad that SKITTERBUG_FOR_PRESIDENT.EXE would help!! I’d make history being the first female actually attaining that position!! Wow!! I appreciate Bowlie’s vote of confidence!!

              I also looked up QED and found a slew of explanations for those three letters but being the ‘learned man” that you are, I figured you were alluding to the following: Quod Erat Demonstrandum (Latin: Which Was to Be Demonstrated)

              I don’t believe I will ask any more questions about stuff I just don’t understand because even the answer to my question left me in the dark!!

              coffeetime I need one now!!

            • #796145

              John, my DOS & Batch days are long behind me, but couldn’t you just use a batch line like:

              @echo “Nastyprogram would now run!”

              (if that’s the syntax) in lieu of “pathnastyprogram.exe”?

            • #796146

              John, my DOS & Batch days are long behind me, but couldn’t you just use a batch line like:

              @echo “Nastyprogram would now run!”

              (if that’s the syntax) in lieu of “pathnastyprogram.exe”?

            • #794274

              Right…

              Embedded deep within a BATch file I have a program DOESNASTYTHINGS.EXE

              I want to test out all other parts of the BATch file, and normally I would put an ECHO command in front of the DOESNASTYTHINGS, which means it just writes a line to the Command Prompt console, and doesn’t actually run the EXE file

              However, in this instance I don’t want to change the BATch file, not even a little bit, so I rename DOESNASTYTHINGS.EXE to SKITTERBUG_FOR_PRESIDENT.EXE (!), and copy NOTHING.EXE to DOESNASTYTHINGS.EXE

              So I can now run the BATch file without worrying about the consequences from the “real” DOESNASTYTHINGS.EXE…

              QED!

            • #794236

              May I ask why one would want a program “to do nothing?” scratch What does one achieve by using it? confused
              thankyou smile

            • #794698

              You’re welcome John. I actually downloaded a small “no fuss” free C compiler to make this, and was also taken aback by the number of bytes needed to achieve nothing! It then dawned on me that there are various “overheads” (e.g. debug information) that are written and/ or linked in during the build process, which can “bloat” things out to varying degrees depending on the compile/ link options selected/ available. But, being on a mission to facilitate you doing nothing ASAP, I didn’t take much of a look at the options offered by this compiler.

              But I did predict your reaction, with you being of the ASM-programming breed grin. I was reminded of the various contests that abounded at one stage, for the smallest “whatever” program. “Hello World” was a popular one of course. But it’s so hard to search for references to this on the web nowadays – the number of people who use to phrase “Hello World” totally out of context, to actually say “Hello” to “everybody” is astounding!

              I can try for a smaller one if you like, since I now know that you doing nothing is only of moderate urgency.

              Alan

            • #794699

              You’re welcome John. I actually downloaded a small “no fuss” free C compiler to make this, and was also taken aback by the number of bytes needed to achieve nothing! It then dawned on me that there are various “overheads” (e.g. debug information) that are written and/ or linked in during the build process, which can “bloat” things out to varying degrees depending on the compile/ link options selected/ available. But, being on a mission to facilitate you doing nothing ASAP, I didn’t take much of a look at the options offered by this compiler.

              But I did predict your reaction, with you being of the ASM-programming breed grin. I was reminded of the various contests that abounded at one stage, for the smallest “whatever” program. “Hello World” was a popular one of course. But it’s so hard to search for references to this on the web nowadays – the number of people who use to phrase “Hello World” totally out of context, to actually say “Hello” to “everybody” is astounding!

              I can try for a smaller one if you like, since I now know that you doing nothing is only of moderate urgency.

              Alan

            • #794770

              And John, if you’re also looking for a person who does nothing, I’m very good at it. I’ll just sit on your couch, drinking your beer, & doing nothing for minimum wage. rofl

            • #794784

              Phil

              Do you need to expand your team? Judging from your mission statement, I feel that I am eminently qualified to join your staff at senior consultancy level. I’d prefer above award rates, commensurate with experience, but I’m prepared to start at the bottom and work my way down. grin

              Alan

            • #795133

              Don’t forget me… I’m a champion channel surfer – although I understand I may be limited to a very small number of channels to surf in the UK.

            • #795134

              Don’t forget me… I’m a champion channel surfer – although I understand I may be limited to a very small number of channels to surf in the UK.

            • #794785

              Phil

              Do you need to expand your team? Judging from your mission statement, I feel that I am eminently qualified to join your staff at senior consultancy level. I’d prefer above award rates, commensurate with experience, but I’m prepared to start at the bottom and work my way down. grin

              Alan

            • #794771

              And John, if you’re also looking for a person who does nothing, I’m very good at it. I’ll just sit on your couch, drinking your beer, & doing nothing for minimum wage. rofl

          • #794214

            Alan

            I didn’t actually need to do nothing urgently (!!) but thank you very much indeed!

            I could have done the same thing with a COM file in about half a dozen bytes, but EXE’s compiled with C must need to be at least 3500 bytes long!

            (I’m not going to complain that “your program doesn’t do anything”!!)

        • #794130

          I’m guessing you’ve used DEBUG before though, being a “batcher”. You could generate a .COM program that does nothing, then use COM2EXE.EXE to make your .EXE.

          What’s wrong with registers and branching and all that asm? It brings back the headaches suffered in CS101 or whatever it was grin.

          Alan

          BTW, I could make the .EXE for you, once I get my C compiler up… but you might be on a time constraint.

          Edited – So being conscious of your potential urgency here it is.

      • #794114

        Thanks, Alan!

        I have no C compiler or linker, and have never programmed in it!

        What was wrong with
        SR 15,15 Clear return code register 15
        BR 14 Return to the operating system

    • #794108

      John

      This is the closest I can think of at the moment – I just happened to be using it when I saw your request. It does “almost nothing”, but if this “almost” is too much for your purposes, you could write & compile a tiny C program that really does nothing:

      int main() {
      return 0; }

      Alan

    • #794115

      [indent]


      …Al — do you remember about…


      [/indent] Maybe it’s a senior moment, but no, I don’t recall it. Don’t want to hijack your thread so maybe you could add an explanationat the end of the thread, after you’ve successfully achieved your goal. Sounds like Leif’s gonna be able to help you.

      • #794809

        Al

        I suppose I can now tell you the story of the hapless IBM systems programmer who messed with IEFBR14.

        In a new release of IBM’s OS/MVT, about Release18 I think, in the early 70s, a junior systems programmer at IBM, who worked in the department that put out new releases of the operating system, was looking at this program, whose only function is to “do nothing” (but is used as a means of “calling the Initiator/Terminator routine to allocate or deallocate disk (and other) datasets” on the mainframe for use by subsequent programs in a Job (which usually consisted of a number of Steps, or program executions)..

        The IEFBR14 program contains exactly two instructions: Clear the return code register to zero, and Branch back to the operating system – a total of 4 bytes (those were the days of efficient programs!).

        He thought he could optimise this program down to just two bytes by removing the apparently unnecessary “Clear Register” instruction, so he did this, and the revised version of IEFBR14 was included in the Release Distribution, and was sent out to and installed by large numbers of companies all over the world.

        What the brainless loon had not realised was that, just before the second program in the Job ran, there would almost invariably be a test that the required datasets had been allocated by the first program, the IEFBR14, which test is done by checking the return code given by IEFBR14! Since the register had now not been cleared, it could contain almost anything, but was highly likely to be nonzero… So jobs would fail randomly but very frequently, until someone corrected the IEFBR14 program…

        I’m not sure what happened to the chap — but I can guess!

        MORAL: the maxim that “the best way to optimise something is not to do it” needs to be thoroughly tested in each particular circumstance!

        • #794873

          I guess I never heard that story, John, so thanks for sharing it. In IBM job title parlance, the normal career path usually was Junior Something, then Associate, to Senior Associate, etc. etc. I’d make book the guy never got to Associate Programmer!

        • #794874

          I guess I never heard that story, John, so thanks for sharing it. In IBM job title parlance, the normal career path usually was Junior Something, then Associate, to Senior Associate, etc. etc. I’d make book the guy never got to Associate Programmer!

      • #794810

        Al

        I suppose I can now tell you the story of the hapless IBM systems programmer who messed with IEFBR14.

        In a new release of IBM’s OS/MVT, about Release18 I think, in the early 70s, a junior systems programmer at IBM, who worked in the department that put out new releases of the operating system, was looking at this program, whose only function is to “do nothing” (but is used as a means of “calling the Initiator/Terminator routine to allocate or deallocate disk (and other) datasets” on the mainframe for use by subsequent programs in a Job (which usually consisted of a number of Steps, or program executions)..

        The IEFBR14 program contains exactly two instructions: Clear the return code register to zero, and Branch back to the operating system – a total of 4 bytes (those were the days of efficient programs!).

        He thought he could optimise this program down to just two bytes by removing the apparently unnecessary “Clear Register” instruction, so he did this, and the revised version of IEFBR14 was included in the Release Distribution, and was sent out to and installed by large numbers of companies all over the world.

        What the brainless loon had not realised was that, just before the second program in the Job ran, there would almost invariably be a test that the required datasets had been allocated by the first program, the IEFBR14, which test is done by checking the return code given by IEFBR14! Since the register had now not been cleared, it could contain almost anything, but was highly likely to be nonzero… So jobs would fail randomly but very frequently, until someone corrected the IEFBR14 program…

        I’m not sure what happened to the chap — but I can guess!

        MORAL: the maxim that “the best way to optimise something is not to do it” needs to be thoroughly tested in each particular circumstance!

    • #794116

      [indent]


      …Al — do you remember about…


      [/indent] Maybe it’s a senior moment, but no, I don’t recall it. Don’t want to hijack your thread so maybe you could add an explanationat the end of the thread, after you’ve successfully achieved your goal. Sounds like Leif’s gonna be able to help you.

    • #794343

      You may have found what you’re after by now but if you use Autoit to create DOSOMETHINGNASTY.au3 with Sleep(“1000”) you could compile it to run for 1 sec doing nothing.

    • #794344

      You may have found what you’re after by now but if you use Autoit to create DOSOMETHINGNASTY.au3 with Sleep(“1000”) you could compile it to run for 1 sec doing nothing.

    • #796279

      Do you want a VB 6 .exe?

    • #796280

      Do you want a VB 6 .exe?

    Viewing 9 reply threads
    Reply To: Want program that does nothing!

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: