Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

I *Hate* When I Do This!
So... my current contract has to do with reformatting data; processing
that was being done in this particular department is being sent off to
another department and the new department wants the data in a different
format.

(Keep in mind that the new department will do nothing whatsoever to their
processing in order to ease this transition so any suggestion that begins
with 'Can't you get the new department to just...' will be met with a
sound whack upon the noggin with a shillelagh.)

Anyhow... the new department is sending us a new version of the employee
master file; we take the old data, check them against the new file,
reformat them and send them on their way... but there's a problem, the new
department doesn't have the ability to determine what an employee's usual
hours are so the master record's area for daily hours - pic 99v99, occurs
14 - contains spaces; when the system is up and running this should show
what either the employee's expected tour-of-duty is... or what the
employee worked last w, depending on... stuff, the phase of the moon
and barometric pressure, I dunno... but no matter what the case there's
just 'air' in there for the nonce.

So... not all of the employees have regular hours, anyhow; some are
'intermittents' who will never have a dependable schedule in their
records.  We're testing a batch of those right now, a mixture of folks
we want to give a default 40-hr w to and others with a 24-hr w...
and if something screwed up I want to make sure they get tested so I
give them a default 80-hr w... and I coded a bit of Ugly Code, along
the lines of:

IF WS-EMPMAST-REC(82:56) = SPACES OR ZEROES OR LOW-VALUES
SET DEFAULT-80HR-USED      TO  TRUE
MOVE WS-DEFAULT-80HR-TOUR  TO  WS-EMPMAST-REC(82:56)
END-IF

IF INTERMITTENT-EMPLOYEE
IF DAILY-CONSULTANT
SET DEFAULT-24HR-USED      TO  TRUE
MOVE WS-DEFAULT-24HR-TOUR  TO  WS-EMPMAST-REC(82:56)
ELSE
SET DEFAULT-40HR-USED      TO  TRUE
MOVE WS-DEFAULT-40HR-TOUR  TO  WS-EMPMAST-REC(82:56)
END-IF
END-IF

(yes, site standard is File Descriptor entries have no prefix and
WORKING-STORAGE entries do... that's how they want it coded, that's how I
code it)

... and used

01  WS-DEFAULT-80HR-TOUR        PIC X(56) VALUE
 '000000800080008000800080000000000080008
00080008000800000'.
01  WS-DEFAULT-40HR-TOUR        PIC X(56) VALUE
 '000000800080008000800080000000000000000
00000000000000000'.
01  WS-DEFAULT-24HR-TOUR        PIC X(56) VALUE
 '000000800080008000000000000000000000000
00000000000000000'.

... as the masks... and the program ran like a watch, no problems...

... and all my results were off... because my counting was off, instead
of:

 '000000800080008000800080000000000080008
00080008000800000'

... as a template I should have used

 '000008000800080008000800000000000800080
00800080008000000'

... and instead of everyone getting 8 hours/day they got .8.

I *hate* when that happens.

DD


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
01-15-05 01:55 PM


Re: I *Hate* When I Do This!
docdwarf@panix.com wrote:

[snip]

> ... and used
>
> 01  WS-DEFAULT-80HR-TOUR        PIC X(56) VALUE
>      '000000800080008000800080000000000080008
00080008000800000'.
> 01  WS-DEFAULT-40HR-TOUR        PIC X(56) VALUE
>      '000000800080008000800080000000000000000
00000000000000000'.
> 01  WS-DEFAULT-24HR-TOUR        PIC X(56) VALUE
>      '000000800080008000000000000000000000000
00000000000000000'.
>
> ... as the masks... and the program ran like a watch, no problems...
>
> ... and all my results were off... because my counting was off, instead
> of:
>
>  '000000800080008000800080000000000080008
00080008000800000'
>
> ... as a template I should have used
>
>  '000008000800080008000800000000000800080
00800080008000000'
>
> ... and instead of everyone getting 8 hours/day they got .8.
>
> I *hate* when that happens.

Don't write a virus to transfer fractions of cents to your bank account
on your last day...  ;)

(Weren't they happy that you cut their payroll to a fraction of what it
used to be?)


--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        Live from Montgomery, AL!       ~
~  /     \/       o  ~                                        ~
~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~         I do not read e-mail at the above address           ~
~    Please see website if you wish to contact me privately   ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e    ~
~ h---- r+++ z++++                                            ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~


Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
01-15-05 01:55 PM


Re: I *Hate* When I Do This!
In article <y%%Ed.39$813.9@fe40.usenetserver.com>,
LX-i  <lxi0007@netscape.net> wrote:
>docdwarf@panix.com wrote:

[snip]
 
>
>Don't write a virus to transfer fractions of cents to your bank account
>on your last day...  ;)

To the best of my knowledge there has never been a case of a 'virus' on a
mainframe.

>
>(Weren't they happy that you cut their payroll to a fraction of what it
>used to be?)

Actually... they were happy to see me make the error.  My tech lead's boss
was sitting in my cube as I went over the code and the data and heard me
muttering and snarling and saw the air turn a curious shade of cyan when I
discovered the cause...

... which confirmed his suspicions about what was happening, even though
he had no explanation as to why he felt that... so it confirmed his having
a Good Nose for Things, which he liked...

... and when I said 'THERE!  *Damnation*, I screwed this one up, I did...
this one's *my* botch, and *mine* alone.' ... he smiled and said
'Finally... after a year and change here you made a mistake?  It's about
time.'

Now they think I'm more like they are... and this makes them more
comfortable.

DD


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
01-15-05 01:55 PM


Re: I *Hate* When I Do This!
"Robert Wagner" <spamblocker-robert@wagner.net> wrote in message
 news:r30hu0tdf1rbjvmhocnscckb7n54qfsg5f@
4ax.com...
> On Sat, 15 Jan 2005 13:38:42 +1300, "Pete Dashwood"
> <dashwood@enternet.co.nz> wrote:
> 
no 
their 
>
> Why not hook up with one of those empty-nest women and take in a
> foster child? You can show both the mountain you love, swim with them,
> cook for them, go to the zoo together.
>
> I did when I was close to your age. I'm two years older than you.
>
It would actually be a step child. I'm too old to  be allowed to foster or
adopt.

Part of the problem with this solution is that I really do value my freedom
and independence. It has been a long time since I had a live-in girlfriend;
I find it works better when she has her own space I have mine.

I wouldn't rule out this suggestion, Robert, but it would need to be a
pretty special lady (and child).

Still, as i observed earlier, who knows what the Hell is going to happen
next...? <G>

Pete.




Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
01-16-05 01:55 AM


Re: I *Hate* When I Do This!
"Robert Wagner" <spamblocker-robert@wagner.net> wrote in message
 news:r30hu0tdf1rbjvmhocnscckb7n54qfsg5f@
4ax.com...
> On Sat, 15 Jan 2005 13:38:42 +1300, "Pete Dashwood"
> <dashwood@enternet.co.nz> wrote:
> 
no 
their 
>
> Why not hook up with one of those empty-nest women and take in a
> foster child? You can show both the mountain you love, swim with them,
> cook for them, go to the zoo together.
>
> I did when I was close to your age. I'm two years older than you.
>
It would actually be a step child. I'm too old to  be allowed to foster or
adopt.

Part of the problem with this solution is that I really do value my freedom
and independence. It has been a long time since I had a live-in girlfriend;
I find it works better when she has her own space I have mine.

I wouldn't rule out this suggestion, Robert, but it would need to be a
pretty special lady (and child).

Still, as i observed earlier, who knows what the Hell is going to happen
next...? <G>

Pete.




Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
01-17-05 08:55 PM


Re: I *Hate* When I Do This!
docdwarf@panix.com wrote:
> In article <03mFd.687$813.421@fe40.usenetserver.com>,
> LX-i  <lxi0007@netscape.net> wrote:
> 
>
>
> Damnation, it has been a... few decades and I cannot remember.  That's the
> one where they want you to walk a mile in a half-hour or so, right?  How
> long do you have to wait to take the make-up exam?

Heh - I wish.  It's a mile and a half, and I'm about 5 minutes or so
slower than I need to be, given my abdominal circumference.  As it turns
out, they didn't make us run today because they didn't have a
defibrillator.  If we don't get to run on Tuesday (the reschedule),
we'll have to do our strength test (push-ups & sit-ups) again.

This is just the beginning of the second year of the new policy.  Before
that, we rode a bike with a telemetry thing around our chest, that
measured heart rate.  I could pass that pretty easily.  :)


--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        Live from Montgomery, AL!       ~
~  /     \/       o  ~                                        ~
~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~         I do not read e-mail at the above address           ~
~    Please see website if you wish to contact me privately   ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e    ~
~ h---- r+++ z++++                                            ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~


Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
01-18-05 01:55 AM


Re: I *Hate* When I Do This!
In article <FIGFd.2498$813.834@fe40.usenetserver.com>,
LX-i  <lxi0007@netscape.net> wrote:
>docdwarf@panix.com wrote: 
>
>Heh - I wish.  It's a mile and a half, and I'm about 5 minutes or so
>slower than I need to be, given my abdominal circumference.

Good luck, then.

DD

Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
01-18-05 01:55 AM


Re: I *Hate* When I Do This!
On Thu, 13 Jan 2005 21:08:19 -0600, LX-i <lxi0007@netscape.net> wrote:

>Heh - I wish.  It's a mile and a half, and I'm about 5 minutes or so
>slower than I need to be, given my abdominal circumference.  As it turns
>out, they didn't make us run today because they didn't have a
>defibrillator.

USMC Command, Fallujah:

Sorry, Colonel, we can't attack that hill today.

Why the hell not?

According to this spreadsheet, which calculates speed as a function of
abdominal circumference, we're too slow. Also, the defibrillator is
down. If someone died out there, we'd be in big trouble. The motor
pool says we'll have armored personnel carriers to taxi us in
tomorrow.

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Wagner
01-18-05 01:55 AM


Re: I *Hate* When I Do This!
In article <ctdfu0tpie0ocrp7sl8gk77te16aptqhju@4ax.com>,
Robert Wagner  <spamblocker-robert@wagner.net> wrote:
>On Thu, 13 Jan 2005 21:08:19 -0600, LX-i <lxi0007@netscape.net> wrote:
> 
>
>USMC Command, Fallujah:
>
>Sorry, Colonel, we can't attack that hill today.
>
>Why the hell not?
>
>According to this spreadsheet, which calculates speed as a function of
>abdominal circumference, we're too slow. Also, the defibrillator is
>down. If someone died out there, we'd be in big trouble. The motor
>pool says we'll have armored personnel carriers to taxi us in
>tomorrow.

Oh, look... a military philosopher!  Do tell, Mr Wagner, is this an
application of a Kantian Categorical Imperative or a Heideggerian Das
Mann?

'Everyone must be held responsible for all conditions in all places at all
times and yet still be accorded none of the priveleges associated with any
of these conditions.'

DD


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
01-18-05 01:55 AM


Re: I *Hate* When I Do This!
On 14 Jan 2005 07:34:05 -0500, docdwarf@panix.com wrote:

>In article <ctdfu0tpie0ocrp7sl8gk77te16aptqhju@4ax.com>,
>Robert Wagner  <spamblocker-robert@wagner.net> wrote: 
>
>Oh, look... a military philosopher!  Do tell, Mr Wagner, is this an
>application of a Kantian Categorical Imperative or a Heideggerian Das
>Mann?
>
>'Everyone must be held responsible for all conditions in all places at all
>times and yet still be accorded none of the priveleges associated with any
>of these conditions.'

Not philosophy, just good-natured ribbing. The Marine Corps fitness
test requires three miles in 28 minutes or less. A company of Second
Recon once did it in 18 minutes, running together in formation.
Six-minute miles wouldn't be remarkable under ordinary conditions, but
runners were wearing boots, carrying burp guns, and a red flag was
flying (no strenuous outdoor activities) due to 100 degree heat. I
remember a doctor shouting "If you take those men out, Lieutenant,
I'll have you court martialed." Twenty finished and a hundred were
overcome by heat. Hoo-ra. :)

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Wagner
01-18-05 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Pages (3): [1] 2 3 »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:26 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.