Skip to main content

[Migrated content. Thread originally posted on 02 June 2012]

Good Afternoon,

I am having a problem creating a Tab Delimited ASCII file. Here is an example:

I write the following ASCII record:
01 MEI-VT-LUCI-HEADER.
03 FILLER PIC X(06)
VALUE "TICKET".
03 FILLER PIC X(01)
VALUE X"09".
03 FILLER PIC X(01)
VALUE "A".
03 FILLER PIC X(01)
VALUE X"09".
03 FILLER PIC X(01)
VALUE "B".

The hex values should be:
54 49 43 4B 45 54 09 41 09 42 0D 0A

However when I look at the hex values in my resulting ASCII file it looks like:
54 49 43 4B 45 54 00 09 41 00 09 42 0D 0A

For some reason the system puts a X"00" before the X"09" in the ASCII file. If I Examine the record before I write it the values look correct.

Can anyone offer some advice ?

Thanks as always,
Bob

[Migrated content. Thread originally posted on 02 June 2012]

Good Afternoon,

I am having a problem creating a Tab Delimited ASCII file. Here is an example:

I write the following ASCII record:
01 MEI-VT-LUCI-HEADER.
03 FILLER PIC X(06)
VALUE "TICKET".
03 FILLER PIC X(01)
VALUE X"09".
03 FILLER PIC X(01)
VALUE "A".
03 FILLER PIC X(01)
VALUE X"09".
03 FILLER PIC X(01)
VALUE "B".

The hex values should be:
54 49 43 4B 45 54 09 41 09 42 0D 0A

However when I look at the hex values in my resulting ASCII file it looks like:
54 49 43 4B 45 54 00 09 41 00 09 42 0D 0A

For some reason the system puts a X"00" before the X"09" in the ASCII file. If I Examine the record before I write it the values look correct.

Can anyone offer some advice ?

Thanks as always,
Bob
This is the default behavior of the Micro Focus file handler when writing characters < X"20" into a line sequential file.

The file handler will insert a null character X"00" before each character that is non-printable so that it can read the same file back in without having the non-printable characters be misinterpreted as control characters like X"0D" or X"0A".

You can change this default behavior by placing the configuration option INSERTNULL=OFF in your extfh.cfg file.

You can also turn it off by using the callable library routine X"91" function 47.

[Migrated content. Thread originally posted on 02 June 2012]

Good Afternoon,

I am having a problem creating a Tab Delimited ASCII file. Here is an example:

I write the following ASCII record:
01 MEI-VT-LUCI-HEADER.
03 FILLER PIC X(06)
VALUE "TICKET".
03 FILLER PIC X(01)
VALUE X"09".
03 FILLER PIC X(01)
VALUE "A".
03 FILLER PIC X(01)
VALUE X"09".
03 FILLER PIC X(01)
VALUE "B".

The hex values should be:
54 49 43 4B 45 54 09 41 09 42 0D 0A

However when I look at the hex values in my resulting ASCII file it looks like:
54 49 43 4B 45 54 00 09 41 00 09 42 0D 0A

For some reason the system puts a X"00" before the X"09" in the ASCII file. If I Examine the record before I write it the values look correct.

Can anyone offer some advice ?

Thanks as always,
Bob
Good Afternoon,

Thanks for your reply.

Bob