• 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

read mainframe comp-3 fields in 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 have a mainframe file which has comp-3 fields. This file is NDM'd to unix and from there, java is supposed to read the values in the file. JRecord is used to read the files. Characters are read properly. Comp-3 fields are read as some junk values. Any idea, whats wrong with my approach ? Am I missing anything?.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

I think you might do well to find out what encoding you are using to read and what encoding is used in the file.
Please always explain abbreviations; they will be unfamiliar to some people. Please supply more details of JRecord.
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, make sure that it is the actual reading of the file that is causing the "junk character" issue and not whatever it is you are using to check what has been read.

Encoding issues can creep in in several places.
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Comp-3 fields are read as some junk values


Can you post a definition of the contents of a comp-3 field
and the java code that is used to read that field.
 
reply
    Bookmark Topic Watch Topic
  • New Topic