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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

H'00'

Status
Not open for further replies.
M

Member 310024

Guest
(1) I have extracted records from a Mainframe DB2 table into a Mainframe TSO dataset.
(2) A 2 byte field in the data-set contains H'00' ie Hex 00
i.e. binary zero, low-values, whatever.
(3) I then FTP the data-set to a PC sp that I can load
it into a Microfocus COBOL ISAM file.
(4) What I find on the PC, within the Line Sequential record containing the 2 byte field, is that everying
to the right of the field containing the H'00' values is missing. Subsequent records are ok.
(5) This mainfests itself in a run time error within the
MF COBOL program that tries to load the Line Seq record into the ISAM record.
(6) I would have thought that low-values is just another
field with a certain bit pattern in it, that happens
to be all zeros, and shouldn't cause any problems.
(7) I have never encountered this problem before, and I am
wondering if anyone has had a similar experience and what sort of work-around they used.
 
Hi TERMINATE,

This is a quite common glitch. COBOL LOW-VALUES does get interpreted as NULL. I have used it to delimit fields being passed to C programs.

In FTP, you need to specify a BINARY transfer option. If this does not help, let us know.

Dimandja
 
Hi,

The binary transfer may work but I would be very wary...
If the record to be FTP'd contains both character & binary data then sending the data as binary may not ensure that the EBCDIC character information is translated to ASCII.
If you want the EBCDIC representation on the PC or it is all binary then it should be OK.
I would always try to transfer in 'external' format if this is possible.

Regards,

Stoggers.
 
There are a number of possibilities here. The first thing to realize is that ascii line sequential files should not be used for files containing binary or packed fields.

So assuming that you did a proper ebcdic to ascii conversion (using a mask on binary data), you could create a sequential rather than a line-sequential file.

Another option is to leave the data as ebcdic and compile your programs with charset"ebcdic" and create a sequential ebcdic file. This has other advantages such as preserving the collating sequence in sorts or index values. Clive
 
Hi TERMINATE,

I agree with both Clive and Stoggers.

Here is another FTP option. Look at the syntax available on your machine for either PUT or GET. On my machine, the syntax for transferring structured files is:
[ignore]
GET remote-file [ local-file ] [ , attribute-list ]

where attribute-list is:
[[ filetype],[ filecode],[ primary],[ secondary],[ maxextents], [ record-len],[ pri-key-len],[ key-offset],[ index-blk-len ]]
[/ignore]
Dimandja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top