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

Low-value byte being inserted before tab

Status
Not open for further replies.

CMGBJG

Programmer
Jul 8, 2008
2
US
I'm trying to write out a sequential tab-delimited text file from a MicroFocus COBOL program on Windows 2003. Before every tab, a low-value byte is somehow being inserted. To make things even more confusing, the problem seems to be server-specific. If I run the exact same executable on a different server (also Windows 2003), the file comes out looking just fine. That leads me to believe that the code is fine as it is, and that some sort of server setting or environment variable needs to be changed.

Any ideas?
 
show us your code please.

Along with compile and runtime options in effect in each environment, and with COBOL version used.

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
We're using MicroFocus 3.0. I'm something of a MicroFocus novice, so I'm afraid that I don't know the compile or runtime options, or even where I'd find them. Sorry. We just run an in-house written batch script to compile the programs into executables. If it helps, here is the line from the batch script that performs the compile:

"C:\Program Files\micro focus\Net Express\Base\BIN\cobol" %1.%2 constant 32-bit (1) INTLEVEL"4" SQL(DBMAN=ODBC,TARGETDB=MSSQLSERVER,NOACCESS);

As for the code, I assume that you are referring to the code defining the tab-delimited output file. That's pretty simple:

05 PSF908-PROPERTY-REC-TYPE PIC X(01) VALUE SPACES.
05 FILLER PIC X(01) VALUE X'09'.

It's basically those two lines repeated over and over for the various field in the file. The definition of the file itself is as follows:

INPUT-OUTPUT SECTION.

FILE-CONTROL.
SELECT UNCASHED-FILE
ASSIGN TO DYNAMIC UNCASHED-FILE-SA
ORGANIZATION IS LINE SEQUENTIAL.
......
DATA DIVISION.

FILE SECTION.

FD UNCASHED-FILE
LABEL RECORDS ARE STANDARD
BLOCK CONTAINS 0 RECORDS
RECORDING MODE IS F.
01 UNCASHED-RECORD PIC X(930).

We are writing to the output file with a very basic WRITE statement:

WRITE UNCASHED-RECORD FROM PSF908-UNCASHED-PROPERTY-REC.

As I said in the original post, I don't believe that the code is the issue, as it has been running perfectly fine on one server for a few years now. Having said that, I should mention that since my original post, I stumbed upon a line of code that does seem to take care of the problem:

CALL X'91' USING RESULT-SA, X'2F', UNCASHED-FILE.

Though this is a functional solution that we'll use if we need to, I'm still baffled as to why the same executable (which does not include the CALL X'91' code) is giving us different results depending on the server it is run on.

 
most likely the runtime directives are not set identically on both machines.

Look at the manual(s) for all available, and on how to set them. If required go to their website and search there.

I may be wrong, but it would be a "T" directive to do the trick.

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top