• Registered (unregistered)

    ''' // CHECK FOR VALID FIELD IF FIELD1 <> *BLANKS AND FIELD1 < 'SECNOD'; IsFrist = *ON; LEAVESR; ENDIF;
    '''

  • Malte (unregistered)

    My suggestion would be to replace a test for var<1 AND var>5 with False. Even with strings, your first character can't be both smaller than '1' and greater than '5' unless in your character enumeration '5' is before '1'. Which wouldn't be impossible with this Highly Paid Consultant.

  • Registered (unregistered)

    ^ HPC says that wrong markdown mark up made me look bad. LOL

  • Hans (unregistered)

    "higher a Highly Paid Consultant" - speech to text issue?

  • (nodebb)

    Well. I hesitate to take the HPC's side, of course, even though he was highered and I was not. But I will state for the record that customers sure as hell love changing their minds and three times out of ten will deny that they ever asked for Feature Foo, despite all evidence proving such, including the Requirements document they signed. (Of course, customers have been known to have high turnovers, which is a great timesaver because you don't even try the "we delivered what as asked for" line.)

  • some guy (unregistered) in reply to dpm

    They may or may not have enjoyed Higher Ed.

  • (nodebb)

    How can it ever be both less than 1 and greater than 5? Surely that AND should be an OR (properly parenthesized)?

  • erffrfez (unregistered)

    How do we know what is stored in that field are numbers? All we can see here are the way they start. Might be 'numbers' in the sense of part numbers, and '1' - '5' are coded as parts of the engine, while '6' - '9' are the chassis. So 12DF6, 43FG7 are engine bits, and 71GG5, 96AB0 are different panels.

    Based on that, I think the highered consultant is a more interesting Wed, Thur, Fri thing

  • erffrfez (unregistered) in reply to adamantoise

    different code space??

  • cschneid (unregistered)

    [...] so they eventually bought their own AS/400. And that meant someone needed to migrate all of their COBOL to RPG.

    COBOL has dialects, including one for the AS/400. So some migration would probably be necessary, but not to a different language.

  • (nodebb)

    higher a Highly Paid Consultant

    Or a highly paid copy editor?

  • Anon E. Mouse (unregistered) in reply to adamantoise

    Story not up to usual DailyWTF standards... A little too much weekend?

  • John Ramsden (unregistered) in reply to cschneid

    has? Are you saying the detestable language is still being used?!!

  • (nodebb)

    O ... if only RPG had a way to store a numeric value ....

    You can do integers, decimals (packed or zoned), and floats in RPG, so there's no excuse!

  • (nodebb) in reply to cschneid

    COBOL has dialects, including one for the AS/400. So some migration would probably be necessary, but not to a different language.

    Clearly you will never be a HPC, cschneid. You don't get to be "highly paid" by doing only the work necessary, after all. If you're in a learning mood and there are no HPCs nearby willing to reveal their secrets, go to the nearest auto dealership and see how many services they tell a customer are "absolutely needed", and how many perfectly good parts "must" be replaced.

  • Bet Rob (unregistered)

    I forgot I'd sent that CodeSOD in!

    Malte and adamantoise--Yes, of course, the AND should have been an OR.

    erffrfez--It was a single-character field, with no inherent meaning. That value was defined by an entity we shared data with. Who never happened to notice that we never had data in that field.

    cschneid--I wondered about the COBOL vs. RPG thing myself. I was hired (highered?) near the end of the project to maintain that mess...er, codebase...and keep the AS/400 running, so I don't know how that decision was made.

    dpm--We had two employees from the HPC firm onsite, each working on a different department's programs. The one in the story was converting straightforward, well-documented reports. She was apparently so unfamiliar with COBOL and RPG (and logic in general) that she couldn't get the reports to balance. The HPCs weren't even adding features, just making sure the new stuff worked like the old stuff.

  • (nodebb) in reply to dpm

    True, but the article cited that they bought their own AS/400, and therefore they moved from COBOL to RPG (probably RPG-II, but whatevs) and therefore they got in an HPC. That sequence of events makes no sense because as cschneid said, AS/400 has COBOL available, and so the "and therefore" of switching to RPG(-II) is null and void.

  • Deeseearr (unregistered) in reply to Registered

    your first character can't be both smaller than '1' and greater than '5' unless in your character enumeration '5' is before '1'

    You're just changing ASCII encodings to make the HPC look bad.

  • Bet Rob (unregistered) in reply to Steve_The_Cynic

    RPG III.

    My employer bought an accounts-payable package from the HPC, including the RPG II (yuck) source code. The software was so bad we replaced it with PC-based within a year or two.

    The company we were sharing/renting an HP3000 with was moving to an AS/400 (three or four racks' worth), so my employer decided to get their own tiny AS/400 model B10. The HPC was an IBM business partner, and apparently they were the ones who said both companies "needed" RPG. Like dpm said, you don't get to be "highly paid" by only doing the work necessary.

    The HPC firm also doesn't get repeat business for a Y2K conversion in a few years, when their client already has 4-digit years in their tables and code. So they dropped the century digits during the conversion. I don't know what excuse they gave my employer for doing that, I wasn't there yet and the people who were have retired.

  • Duston (unregistered)

    "AS/400 has COBOL available," however not necessarily included in the unit they purchased which would meaning buying and licensing another product from IBM. [Cha-ching.]

  • MRAB (unregistered) in reply to Hans

    Maybe you "hire" a consultant but "higher" a Highly Paid Consultant.

  • Jmm (unregistered) in reply to Duston

    Usually all compilers come together with the same licensed program. Though now that I think about it, if it were a real AS/400, then you might have had to purchase each one separately back then. I don't remember any more.

  • Duke of New York (unregistered)

    Everything old is new again. Migrate that code to the cloud!

  • Loren Pechtel (unregistered)

    Cobol, numbers as text. Makes me question whether this might be a one character field.

    (Still doesn't excuse the bug, though.)

  • Officer Johny Holzkopf (unregistered) in reply to adamantoise

    The requirement "both less than 1 and greater than 5" can be fulfilled by the value 07: the leading zero is alphabetically less than 1, and the 7 is numerically greater than 5. Also, the RPG presented seems to be "free-form RPG", very modern, good sale. Imagine you would need to present (and explain) column-oriented "classic RPG"... Finally: Get off my lawn.

  • (nodebb) in reply to Malte

    In theory a combination of UTF-8 characters (where some values appear to have sign bits set) and software that expects 7-bit ASCII might end up processing something so that both the <1 and >5 comparisons succeed.

  • (nodebb) in reply to zomgwtf

    I can't see how that would happen. Any seven bit ASCII character is encoded as is in UTF-8 and so the comparison would always fail. Any other UTF-8 character always starts with a byte with the top bit set. Such a byte would be less than '1' if it was treated as a signed number and greater than '5' if it was treated as an unsigned number. So for the condition to ever be true, the compiler would need to treat the number as signed and unsigned in the same expression.

Leave a comment on “A Highly Paid Field”

Log In or post as a guest

Replying to comment #681848:

« Return to Article