• Post Reply Bookmark Topic Watch Topic
  • New Topic

Writing a Pic S9(05)V99 Comp-3 to the mainframe from Java  RSS feed

 
Mike Ebrown
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on a Java program. I have to write a file out to the mainframe computer. A Cobol prorgram also reads and writes records to the same table so the format has to stay the same. One column in the record consist of Pic X(10), Pic 9(7), Pic S9(4) Comp and Pic S9(05)V99 Comp-3 data. How do I convert an Integer or Double to a Pic S9(05)V99 Comp-3 before I write it out to the table ?
Thanks for any help.
 
Steve Fahlbusch
Bartender
Posts: 612
7
Mac OS X Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While it might be trivial (in code) the understand is quite involved. In COBOL, we define the format as well as the internal storage type. In Java we do not. Please take some time to fully understand how COMP and COMP-3 are handled in COBOL, then you may find that your answer is simple and straight forward. If not (after your research, please post again).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!