• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 201
 
Bartender
Posts: 612
7
Mac OS X Python
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic