Good Morning,
I am trying to read an ASCII file that is delimited by TAB (hex 09) characters, but when I READ the file through my COBOL program the TAB has been replaced by spaces.
I check my EXTFH file and the setting for EXPANDTAB=OFF.
Any thoughts?
Thanks,
Bob
Good Morning,
I am trying to read an ASCII file that is delimited by TAB (hex 09) characters, but when I READ the file through my COBOL program the TAB has been replaced by spaces.
I check my EXTFH file and the setting for EXPANDTAB=OFF.
Any thoughts?
Thanks,
Bob
Hi Bob,
I think that the issue that you are experiencing may be caused by how the record appears to you in the debugger and not how it is actually being read.
If you use EXPANDTAB=OFF then when you read the file, the tab characters will not be expanded in the record area for that file.
However if you examine the record area using the debugger in ASCII it will show the data with embedded spaces because this is how a tab character is displayed in the examine window.
If you change the display mode to hex then you can clearly see the data that is actually in the record includes the X"09" character for the tab and not the X"20" characters for the spaces.
If you have EXPANDTAB=ON set then in hex the X"20" characters will be in the record area instead of the X"09" characters.
Is this the behavior that you are experiencing?
Good Morning,
I am trying to read an ASCII file that is delimited by TAB (hex 09) characters, but when I READ the file through my COBOL program the TAB has been replaced by spaces.
I check my EXTFH file and the setting for EXPANDTAB=OFF.
Any thoughts?
Thanks,
Bob
Good Morning Chris,
I have the viewer in "hex" mode and I am seeing X"20" instead of the X"09", it is almost like the system is not seeing the EXPANDTAB=OFF.
Any other suggestions?
Thanks,
Bob
Good Morning,
I am trying to read an ASCII file that is delimited by TAB (hex 09) characters, but when I READ the file through my COBOL program the TAB has been replaced by spaces.
I check my EXTFH file and the setting for EXPANDTAB=OFF.
Any thoughts?
Thanks,
Bob
Good Morning Chris,
I have the viewer in "hex" mode and I am seeing X"20" instead of the X"09", it is almost like the system is not seeing the EXPANDTAB=OFF.
Any other suggestions?
Thanks,
Bob
Good Morning,
I am trying to read an ASCII file that is delimited by TAB (hex 09) characters, but when I READ the file through my COBOL program the TAB has been replaced by spaces.
I check my EXTFH file and the setting for EXPANDTAB=OFF.
Any thoughts?
Thanks,
Bob
Are you setting the EXTFH environment variable to point to the location of the EXTFH.CFG file?
Are you setting EXPANDTAB=OFF under [XFH-DEFAULT] or under a specific filename?
Good Morning,
I am trying to read an ASCII file that is delimited by TAB (hex 09) characters, but when I READ the file through my COBOL program the TAB has been replaced by spaces.
I check my EXTFH file and the setting for EXPANDTAB=OFF.
Any thoughts?
Thanks,
Bob
Hi Chris,
That was it, I had the EXPANDTAB=OFF under a specific file name, not under the default.
Thanks for your help,
Bob
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.