Help!!! 
Author Message
 Help!!!

I'm a senior in college who is trying to get a job with a computer
consulting firm.  To that end I need to learn VS COBOL II in a very
short period of time.  I've bought two books (Cobol For Dummies and
COBOL II)  Unfortunately there seems to be a dearth of books out there
and I can't find out exactly what I need.  I've already taken a test
once with this company and I did poorly but I've been given a second
chance.  My specific question at this point is in regards to storage
considerations when using COMP-3 as opposed to Binary and other methods
of defining a PIC statement.  I'm fairly computer illiterate so I'd
appreciate any responses to be fairly simple.  Also, are packed decimal
and COMP-3 the same animal?  The Dummies book makes it sound that way
and it almost seems too easy.  Thanks for any help you can give me.



Thu, 21 Sep 2000 04:00:00 GMT  
 Help!!!

Quote:
>are packed decimal and COMP-3 the same animal?

Yes. COMP-3 is stored by converting each digit of the original
number into a 4-bit (i.e. half byte) binary representation. Then,
a half-byte is added on for the sign.

I think some packed decimal formats also store the position
of the decimal place. Thios is not required for COMP-3, because
the inmterpretation of the number (i.e. the decision about where
the decimal point is) is code in the PIC clause.

Regards,

- Damien



Thu, 21 Sep 2000 04:00:00 GMT  
 Help!!!

Quote:

> I'm a senior in college who is trying to get a job with a computer
> consulting firm.

Translation: 'I am trying to run before I can walk'

Quote:
> To that end I need to learn VS COBOL II in a very
> short period of time.  I've bought two books (Cobol For Dummies and
> COBOL II)  Unfortunately there seems to be a dearth of books out there
> and I can't find out exactly what I need.  I've already taken a test
> once with this company and I did poorly but I've been given a second
> chance.

Translation: 'The firm which hopes to hire me will send rank nubies to a
client's site in hopes that they will swim, not sink... but no matter
what we'll be getting a *huge* chunk of the billings'

Quote:
> My specific question at this point is in regards to storage
> considerations when using COMP-3 as opposed to Binary and other methods
> of defining a PIC statement.  I'm fairly computer illiterate so I'd
> appreciate any responses to be fairly simple.

Translation: 'Not only don't I know what I am doing but I cannot read
the manuals, either'

Quote:
> Also, are packed decimal
> and COMP-3 the same animal?  The Dummies book makes it sound that way
> and it almost seems too easy.  Thanks for any help you can give me.

The help I offer is:  stay away from consulting until you have at least
two years' worht of experience in the trenches.  Doing otherwise will be
unsatisfactory for you, unsatisfactory for the client and a blight on
the aspect of a profession which already has enough boils to lance.

DD



Thu, 21 Sep 2000 04:00:00 GMT  
 Help!!!

Good luck to you Matt. I am really glad to hear from someone who is trying
so hard to learn COBOL. Most would have given up.

I hear a lot about Comp numbers in this newsgroup so they must confuse a
lot of persons. Basically  Comp numbers are used to save on storage space
and because of efficiency. The trouble often comes when you need to see
WHAT the value is or Display that number. (I often create a temp. field in
working storage and move it there just to see what the heck it is.
Cheating, but it works.
(Comp numbers are often used as Table subscripts too  :-)

Where I work we use many different kind of COMP numbers. I hate 'em,
they're just a pain in the a$$.
cwiley
===someone posted this on this newsgroup:

  In IBM Cobol:

  The physical length of a packed decimal item is always:

    Number of digits (rounded up to an odd number), then add 1 and
    divide the answer by two. A decimal point in the picture has no
    effect on this formula.

  Packed decimal is COMP-3. The picture that you show is COMP, which
  is pure binary and follows a different formula:

    Number of digits in the Picture      Bytes required

               1-4                            2
               5-9                            4
              10-18                           8

   S9(4) uses 4 bytes (the sign part of the right-hand digit).


Quote:
> I'm a senior in college who is trying to get a job with a computer
> consulting firm.  To that end I need to learn VS COBOL II in a very
> short period of time.  I've bought two books (Cobol For Dummies and
> COBOL II)  Unfortunately there seems to be a dearth of books out there
> and I can't find out exactly what I need.  I've already taken a test
> once with this company and I did poorly but I've been given a second
> chance.  My specific question at this point is in regards to storage
> considerations when using COMP-3 as opposed to Binary and other methods
> of defining a PIC statement.  I'm fairly computer illiterate so I'd
> appreciate any responses to be fairly simple.  Also, are packed decimal
> and COMP-3 the same animal?  The Dummies book makes it sound that way
> and it almost seems too easy.  Thanks for any help you can give me.

P.S. Pasted more stuff below from a post by Jim Van Sickle et others.

Quote:
>>As i understand it

>>display is default but has to be converted into binary.  Has to be used it
>>output is to be read by humans

>>Comp-4 is binary INTEGER native form and default if you use just COMP
>>Comp-1 is used when you need single precision floating point
>>Comp-2 is double prescision

>>Comp-3 is related to stroage (packed decimal).  Gives you more storage at
>>expense of speed since it needs to be converted to binary by computer

>>Tradeoff is: if you use COMP for all numbers you get speed at expense of
>>storage since COMP takes up 1 byte per number versus COMP-3s 2 # per byte

>Dealing in a mainframe IBM environment, forget Comp-4.

>COMP.  Each data element is stored in a full-word of storage (32-bit
>or 4-bytes) regardless of the picture clause specified so it's less
>storage efficient than COMP-3 unless are consistently dealing with
>very large numbers.  Data is moved or manipulated by binary
>instructions.  Data must be moved into system registers to be acted
>upon and the result stored back in  program storage.  Arithmetic is
>faster than COMP-3 but this can be slowed by the time needed to
>convert the data. Before being displayed, data is converted to COMP-3
>and then to display.

>COMP-1, COMP-2.  Data is stored in short or long floating point.
>Seldom used in COBOL because the size of the numbers and/or precision
>is usually not needed.  Data is acted upon using the floating point
>instructions.  Very fast arithemtic. Conversion to display formats is
>slow.  

>COMP-3.  Data is stored in bytes of data (2 digits per byte, plus 1
>position for sign digit). Picture should always be an odd number to
>allow for this, even if your data is not signed. Data is acted upon by
>the packed decimal instructions which work storage to storage, no
>registers needed.  Not as fast as binary but usually uses much less
>storage and is much faster to convert to display. Data must be
>converted to display format to use in printing or on the screen.

>Display. Data is stored in bytes of data (1 digit per byte, high order
>nibble of the rightmost byte is used to store the sign, if any). Data
>can be displayed but must be converted to COMP-3 format before compare
>or arithmetic operations can be performed.

>Hope this helps.

>                       Scott Peterson

In the IBM mainframe environment usage of the variable determines how it
should be defined.

COMP. Should be used for subscripts and anything involving pointers as the
compiler is always going to use binary computations when using these
items.

COMP-3. Should be used for items which will be used for math in the
program (Add, Subtract, Multiply, Divide and Compute). Should normally be
defined with an odd number of digits to prevent the compiler from
generating special code to check for overflow into the high order nibble.

======

Quote:
> 2. Our system needs to export a data file to our local IBM/Intel PC.
> The
>    file then gets sent to the bank's mainframe for processing.

--snip--
Kevin,
Based on your 2nd statement, it seems pretty clear what your
requirements are.
Your bank is apparently looking for what is known as a 'zoned decimal',
although there are other names for it (flamers back off!).
Let's take a shorter example, say PIC S9(4). On the mainframe, the value
+1234 would be stored in hex as "F1F2F3C4", and -1234 would be
"F1F2F3D4". The high-order nibble of the last byte signifies positive
("C" or "F") or negative ("D").
Unfortunately, since you're data is in ASCII format, you need to take
into consideration how the data is going to be translated (by you or
them?) before the bank 'imports' it. An ASCII "32" will no doubt
translate to an EBCDIC "F2", but what would translate to a "D2"?!
Hope this helps.
Cheers :-)
--


Thu, 21 Sep 2000 04:00:00 GMT  
 Help!!!

Goobers? You are a very bad boy... hilariously funny, but very, very
{*filter*}...

--
The Programmer Has Spoken -- SO THERE!

Quote:


>> I'm a senior in college who is trying to get a job with a computer
>> consulting firm.

>Translation: 'I am trying to run before I can walk'

>> To that end I need to learn VS COBOL II in a very
>> short period of time.  I've bought two books (Cobol For Dummies and
>> COBOL II)  Unfortunately there seems to be a dearth of books out there
>> and I can't find out exactly what I need.  I've already taken a test
>> once with this company and I did poorly but I've been given a second
>> chance.

>Translation: 'The firm which hopes to hire me will send rank nubies to a
>client's site in hopes that they will swim, not sink... but no matter
>what we'll be getting a *huge* chunk of the billings'

>> My specific question at this point is in regards to storage
>> considerations when using COMP-3 as opposed to Binary and other methods
>> of defining a PIC statement.  I'm fairly computer illiterate so I'd
>> appreciate any responses to be fairly simple.

>Translation: 'Not only don't I know what I am doing but I cannot read
>the manuals, either'

>> Also, are packed decimal
>> and COMP-3 the same animal?  The Dummies book makes it sound that way
>> and it almost seems too easy.  Thanks for any help you can give me.

>The help I offer is:  stay away from consulting until you have at least
>two years' worht of experience in the trenches.  Doing otherwise will be
>unsatisfactory for you, unsatisfactory for the client and a blight on
>the aspect of a profession which already has enough boils to lance.

>DD



Thu, 21 Sep 2000 04:00:00 GMT  
 Help!!!

Sheesh... I really, Really, REALLY need to get me a job that pays more than
I'm getting right now.

The sad thing is, Matt here will learn a few cute tricks in Java or VB, put
on a suit, get a management-style haircut, and, for the next two years, all
the pointy haired idiots populating the execute suites at places like GM or
Ford or Proctor & Gamble will think he's the greatest COBOL programmer who
ever lived!

Nothing personal, Matt... you're just another pawn in the corporate game.

--
The Programmer Has Spoken -- SO THERE!

Quote:

>I'm a senior in college who is trying to get a job with a computer
>consulting firm.  To that end I need to learn VS COBOL II in a very
>short period of time.  I've bought two books (Cobol For Dummies and
>COBOL II)  Unfortunately there seems to be a dearth of books out there
>and I can't find out exactly what I need.  I've already taken a test
>once with this company and I did poorly but I've been given a second
>chance.  My specific question at this point is in regards to storage
>considerations when using COMP-3 as opposed to Binary and other methods
>of defining a PIC statement.  I'm fairly computer illiterate so I'd
>appreciate any responses to be fairly simple.  Also, are packed decimal
>and COMP-3 the same animal?  The Dummies book makes it sound that way
>and it almost seems too easy.  Thanks for any help you can give me.



Thu, 21 Sep 2000 04:00:00 GMT  
 Help!!!

Quote:

> Goobers? You are a very bad boy... hilariously funny, but very, very
> {*filter*}...

You should have seen the response the laddie-buck emailed me, full of
dimestore Freudianisms and accusations that I felt threatened by his
Obviously Sterling Qualities... bah.

He might be the next Grace Hopper, for all I know... but I've been
called in to fix *far* too many glitches, or interrupted in the middle
of designing an n-level array by someone asking (pace, Hamasaki!) 'Hey,
what's this x'1979AF' mean?' to accept such claims at face value.

DD

Quote:

> --
> The Programmer Has Spoken -- SO THERE!



> >> I'm a senior in college who is trying to get a job with a computer
> >> consulting firm.

> >Translation: 'I am trying to run before I can walk'

> >> To that end I need to learn VS COBOL II in a very
> >> short period of time.  I've bought two books (Cobol For Dummies and
> >> COBOL II)  Unfortunately there seems to be a dearth of books out there
> >> and I can't find out exactly what I need.  I've already taken a test
> >> once with this company and I did poorly but I've been given a second
> >> chance.

> >Translation: 'The firm which hopes to hire me will send rank nubies to a
> >client's site in hopes that they will swim, not sink... but no matter
> >what we'll be getting a *huge* chunk of the billings'

> >> My specific question at this point is in regards to storage
> >> considerations when using COMP-3 as opposed to Binary and other methods
> >> of defining a PIC statement.  I'm fairly computer illiterate so I'd
> >> appreciate any responses to be fairly simple.

> >Translation: 'Not only don't I know what I am doing but I cannot read
> >the manuals, either'

> >> Also, are packed decimal
> >> and COMP-3 the same animal?  The Dummies book makes it sound that way
> >> and it almost seems too easy.  Thanks for any help you can give me.

> >The help I offer is:  stay away from consulting until you have at least
> >two years' worht of experience in the trenches.  Doing otherwise will be
> >unsatisfactory for you, unsatisfactory for the client and a blight on
> >the aspect of a profession which already has enough boils to lance.

> >DD



Fri, 22 Sep 2000 03:00:00 GMT  
 Help!!!

Quote:

> considerations when using COMP-3 as opposed to Binary and other methods
> of defining a PIC statement.  I'm fairly computer illiterate so I'd
> appreciate any responses to be fairly simple.  Also, are packed decimal
> and COMP-3 the same animal?  The Dummies book makes it sound that way
> and it almost seems too easy.  Thanks for any help you can give me.

For your purposes, at your chosen location yes COMP-3 and Packed Decimal
are exactly the same thing.


Fri, 22 Sep 2000 03:00:00 GMT  
 Help!!!

Yes, Thane, on big blues (IBM hardware).

But not on a Bull DPS7000 for example. There a comp-3 without an S in the
picture but with an even number of digits fits exactly in one or more bytes,
because NO space is taken for a dummy sign (as opposed to ibm, where the sign
is always present, wether or not an S is in the PIC).

The Frog (in the middle of a conversion job).

Quote:


> > considerations when using COMP-3 as opposed to Binary and other methods
> > of defining a PIC statement.  I'm fairly computer illiterate so I'd
> > appreciate any responses to be fairly simple.  Also, are packed decimal
> > and COMP-3 the same animal?  The Dummies book makes it sound that way
> > and it almost seems too easy.  Thanks for any help you can give me.

> For your purposes, at your chosen location yes COMP-3 and Packed Decimal
> are exactly the same thing.



Fri, 22 Sep 2000 03:00:00 GMT  
 Help!!!

Quote:


> > I'm a senior in college who is trying to get a job with a computer
> > consulting firm.

> Translation: 'I am trying to run before I can walk'

> > To that end I need to learn VS COBOL II in a very
> > short period of time.  I've bought two books (Cobol For Dummies and
> > COBOL II)  Unfortunately there seems to be a dearth of books out there
> > and I can't find out exactly what I need.  I've already taken a test
> > once with this company and I did poorly but I've been given a second
> > chance.

> Translation: 'The firm which hopes to hire me will send rank nubies to a
> client's site in hopes that they will swim, not sink... but no matter
> what we'll be getting a *huge* chunk of the billings'

> > My specific question at this point is in regards to storage
> > considerations when using COMP-3 as opposed to Binary and other methods
> > of defining a PIC statement.  I'm fairly computer illiterate so I'd
> > appreciate any responses to be fairly simple.

> Translation: 'Not only don't I know what I am doing but I cannot read
> the manuals, either'

> > Also, are packed decimal
> > and COMP-3 the same animal?  The Dummies book makes it sound that way
> > and it almost seems too easy.  Thanks for any help you can give me.

> The help I offer is:  stay away from consulting until you have at least
> two years' worht of experience in the trenches.  Doing otherwise will be
> unsatisfactory for you, unsatisfactory for the client and a blight on
> the aspect of a profession which already has enough boils to lance.

> DD

Hey, That's my dermatologists name Dr. Lance D. Boyle

mickey



Fri, 22 Sep 2000 03:00:00 GMT  
 Help!!!


Quote:
>I'm a senior in college who is trying to get a job with a computer
>consulting firm.  To that end I need to learn VS COBOL II in a very
>short period of time.  I've bought two books (Cobol For Dummies and
>COBOL II)  Unfortunately there seems to be a dearth of books out there
>and I can't find out exactly what I need.  I've already taken a test
>once with this company and I did poorly but I've been given a second
>chance.  My specific question at this point is in regards to storage
>considerations when using COMP-3 as opposed to Binary and other methods
>of defining a PIC statement.  I'm fairly computer illiterate so I'd
>appreciate any responses to be fairly simple.  Also, are packed decimal
>and COMP-3 the same animal?  The Dummies book makes it sound that way
>and it almost seems too easy.  Thanks for any help you can give me.

Wow!  Kinda threw the cart in front of the horse here, didn't you?
You've got quite a bit to learn, and not much time to learn it.

For your purposes, COMP-3 and packed decimal are the same thing...

Dave




Fri, 22 Sep 2000 03:00:00 GMT  
 Help!!!

Quote:

(snippus maximus)
> > The help I offer is:  stay away from consulting until you have at least
> > two years' worht of experience in the trenches.  Doing otherwise will be
> > unsatisfactory for you, unsatisfactory for the client and a blight on
> > the aspect of a profession which already has enough boils to lance.

> > DD

> Hey, That's my dermatologists name Dr. Lance D. Boyle

Better your dermatologist than your proctologist, or your shrink!

Bill {*filter*} :-)

Quote:

> mickey



Fri, 22 Sep 2000 03:00:00 GMT  
 
 [ 31 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. help! f90.help help help help

2. ***HELP***HELP***NEED INFORMATION***HELP***HELP

3. HELP HELP HELP HELP

4. HELP HELP HELP HELP

5. Ord Function HELP Please HELP HELP HELP

6. help help help help!!!!!!!!!!!

7. (HELP (HELP (HELP (HELP))))

8. HELP: HELP: HELP: HELP: Online-manual on Expect

9. Help Help Help

10. TopSpeed - ODBC 3.1???? HELP HELP HELP

11. HELP - HELP - HELP

12. HELP HELP HELP - round function error

 

 
Powered by phpBB® Forum Software