For Programmers: Free Programming Magazines  


Home > Archive > Cobol > July 2004 > cobol heck - i'm makjing progress









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cobol heck - i'm makjing progress
Carol

2004-07-28, 3:55 pm

I have actally have been making progress. I have nearly 1200 fields and one
way or another, I have narrowed it down to about 50 that I don;t quite get.
I'm sure that these are simple but could you fill in the blanks.

As you can see I have 2 completed examples, the other 5 are mystery to me.

The thing is, rather than understand this stuff, I have been using pattern
matching to translate these stinkers. The empty ones below, I do not quite
have the pattern right.

This rich text file might not post right, so if not I will try again.
Thanks

COBOL
Field_Size
FieldType
input_record
output_record

S9(1)V
1
10



S9(3)V
2
10



S9(5)V
3
10



S9(7)V
4
10
pack_lowsign * 5
ascii * pic --------9.99

S9(9)V
5
10



S9(11)V
6
10



S9(14)V
8
10
pack_lowsign * 8
ascii * pic --------9.99





Carol

2004-07-28, 3:55 pm

This might be easier to read!
"COBOL" "Field_Size" "FieldType" "input_record" "output_record"
"S9(1)V" 1 10
"S9(11)V" 6 10
"S9(14)V" 8 10 "pack_lowsign * 8" "ascii * pic --------9.99"
"S9(3)V" 2 10
"S9(5)V" 3 10
"S9(7)V" 4 10 "pack_lowsign * 5" "ascii * pic --------9.99"
"S9(9)V" 5 10




"Carol" <kgdg@helkusa.com> wrote in message
news:wp-dnfX0oOF6uZrcRVn-vg@comcast.com...
> I have actally have been making progress. I have nearly 1200 fields and

one
> way or another, I have narrowed it down to about 50 that I don;t quite

get.
> I'm sure that these are simple but could you fill in the blanks.
>
> As you can see I have 2 completed examples, the other 5 are mystery to me.
>
> The thing is, rather than understand this stuff, I have been using

pattern
> matching to translate these stinkers. The empty ones below, I do not

quite
> have the pattern right.
>
> This rich text file might not post right, so if not I will try again.
> Thanks
>
> COBOL
> Field_Size
> FieldType
> input_record
> output_record
>
> S9(1)V
> 1
> 10
>
>
>
> S9(3)V
> 2
> 10
>
>
>
> S9(5)V
> 3
> 10
>
>
>
> S9(7)V
> 4
> 10
> pack_lowsign * 5
> ascii * pic --------9.99
>
> S9(9)V
> 5
> 10
>
>
>
> S9(11)V
> 6
> 10
>
>
>
> S9(14)V
> 8
> 10
> pack_lowsign * 8
> ascii * pic --------9.99
>
>
>
>
>



Glenn Someone

2004-07-28, 3:55 pm

I don't quite understand what you are trying to convey with your notes
here, but I can help a little.

What you are encountering seems to be COMP-3 fields mainly as you
describe here based on comparing the field sizes you list with the
specifications. Another term for this is "packed decimal" fields.

Examples (where $ means it's a hex byte):

+3743 = $03 $74 $3C
-143 = $14 $3D
32471 = $32 $47 $1F (this one shouldn't matter too much since you list
signs - the F means no sign is indicated)

The S in the definition means to store the sign, and the V is just an
implied decimal point.

I don't know the rest of your notations (field type onward) so I can't
say too much more because I don't know your expectations with those.

On Tue, 27 Jul 2004 22:08:54 -0600, "Carol" <kgdg@helkusa.com> wrote:

>This might be easier to read!
>"COBOL" "Field_Size" "FieldType" "input_record" "output_record"
>"S9(1)V" 1 10
>"S9(11)V" 6 10
>"S9(14)V" 8 10 "pack_lowsign * 8" "ascii * pic --------9.99"
>"S9(3)V" 2 10
>"S9(5)V" 3 10
>"S9(7)V" 4 10 "pack_lowsign * 5" "ascii * pic --------9.99"
>"S9(9)V" 5 10


Robert Wagner

2004-07-28, 3:55 pm

"Carol" <kgdg@helkusa.com> wrote:

>This might be easier to read!
>"COBOL" "Field_Size" "FieldType" "input_record" "output_record"
>"S9(1)V" 1 10
>"S9(11)V" 6 10
>"S9(14)V" 8 10 "pack_lowsign * 8" "ascii * pic --------9.99"
>"S9(3)V" 2 10
>"S9(5)V" 3 10
>"S9(7)V" 4 10 "pack_lowsign * 5" "ascii * pic --------9.99"
>"S9(9)V" 5 10


Asterisk means the next word is size. In the output definition, the asterisk
seems out of place.

Robert Wagner

2004-07-28, 3:55 pm

"Carol" <kgdg@helkusa.com> wrote:

>This might be easier to read!
>"COBOL" "Field_Size" "FieldType" "input_record" "output_record"
>"S9(1)V" 1 10
>"S9(11)V" 6 10
>"S9(14)V" 8 10 "pack_lowsign * 8" "ascii * pic --------9.99"
>"S9(3)V" 2 10
>"S9(5)V" 3 10
>"S9(7)V" 4 10 "pack_lowsign * 5" "ascii * pic --------9.99"
>"S9(9)V" 5 10


On the input side, the size is ((digits + 1) / 2), rounded up if necessary.Thus,
S9(11) has a size of 6.

Carol

2004-07-28, 3:55 pm

thanks that is the formula i need.

"Robert Wagner" <robert.deletethis@wagner.net> wrote in message
news:4107728b.65347019@news.optonline.net...
> "Carol" <kgdg@helkusa.com> wrote:
>
>
> On the input side, the size is ((digits + 1) / 2), rounded up if

necessary.Thus,
> S9(11) has a size of 6.
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com