Re: Converting numbers to comp fields (Cobol)
From: BeastFish (beastfish_at_for-president.com)
Date: 06/15/04
- Next message: Doug van Vianen: "Printing Rotated Text - Setting Font Face Etc"
- Previous message: Jezebel: "Re: Checking if Drive is Writable"
- In reply to: John: "Converting numbers to comp fields (Cobol)"
- Next in thread: Don_at_home.com: "Re: Converting numbers to comp fields (Cobol)"
- Reply: Don_at_home.com: "Re: Converting numbers to comp fields (Cobol)"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 15 Jun 2004 00:51:18 -0400
Comp? Comp-3? Doesn't really matter since COMP is a COBOL thing, VB
doesn't handle any type of COMP format natively. Seems like a box full of
frustration just waiting to be opened. One of those things that even if you
did get something working, you'd always wonder if you're twiddling those
bits accurately. Consider the following...
How COMP format is implemented depends on the specific COBOL compiler.
Different compilers implement it in their own fashion. Usually, COMP is
some form of fixed point BCD (binary-coded decimal), where 2 digits are
stored in each byte (1 per nibble). Also, depending on which compiler, it
can be little-endian or big-endian. Dealing with this in VB (or any other
language besides COBOL) is something I wouldn't even think of doing.
The MicroFocus COBOL compiler I have on my box is a 12 year old DOS one. I
haven't investigated any of the later MicroFocus ones, so I don't know what
they've been up to. Does the version you're using have any Windows support?
Can it create DLLs that can be utilized by Windows programs? If so, perhaps
you can use it to write a DLL that writes the data to file, one that can be
called from VB.
"John" <anonymous@discussions.microsoft.com> wrote in message
news:1c26d01c4525c$6b1c6b70$a301280a@phx.gbl...
> I'm new to Visual Basic. I have written an little program
> that creates a journal entry batch file which gets loaded
> to our Unix box. We then run a utility to convert some of
> the fileds in the batch to comp fields so that our
> Accounting system can read it. We are using Micro Focus
> as our Cobol provider.
>
> My question is can I use VB to generate the same comp
> fields as Cobol. I would love to skip running the batch
> through the conversion utility each time.
>
> Thanks in advance....
>
> John
- Next message: Doug van Vianen: "Printing Rotated Text - Setting Font Face Etc"
- Previous message: Jezebel: "Re: Checking if Drive is Writable"
- In reply to: John: "Converting numbers to comp fields (Cobol)"
- Next in thread: Don_at_home.com: "Re: Converting numbers to comp fields (Cobol)"
- Reply: Don_at_home.com: "Re: Converting numbers to comp fields (Cobol)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|