Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Low Value Hex

Status
Not open for further replies.

Cobby1812

IS-IT--Management
Jun 22, 2006
58
GB
Morning,
I have what appears to be a really stupid question...but everytime I ask my sofwtare house I get a random response. Basicially I need to create a file as on a server as follows:-


001123456702 50000.00

The point between the 2 and the 5 are supposed to be low values (I have been told I cant use spaces).....how on earth to I get a flat file to show this.

Any clues would be great

 
Can you provide the record description for this data record, please. Also, what COBOL compiler are you using to produce the data?

Tom Morrison
Hill Country Software
 
Just assign x'00' to that position - assuming that it is PIC X.


Nic
 
How is this file/data to be used?

LOW-VALUES is not a "printable" value. Showiont the data in HEX will allow someone to "see" the x'00'.
 
If the file is a Line Sequential file, by default Micro Focus COBOL (and maybe others) will insert a low-value byte (as an escape code) before any caontrol character in the data (characters < than space). Thus if you accept the default and put a low-value character in the data, you will get two! low-value characters. Upon reading such a file, the low-value (escape) byte will be removed before presenting the data to the application.
 
A couple of possiblities

[ol 1]
[li]Write a program[/li]
[li]Use a Hex Editor[/li]
[li]Use something like the RecordEditor. You will need to setup the file definition. For the Hex-Zero field, define as a binary integer and set it to 0.
[/li]
[li]On the mainframe, use standard SPF editor and put hex mode[/li]
[/ol]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top