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

Tab Delimited Line Sequentail File 1

Status
Not open for further replies.

Kdelta

Programmer
Jul 17, 2011
4
0
0
KE
Hi,

How can i create line sequential file with tab delimited fields?
My text file looks something like this:
FD TEXT-FILE
RECORD CONTAINS 116 CHARACTERS
LABEL RECORDS STANDARD.
01 TEXT-RECORD PIC X(116).
01 TEXT-TEMPLATE REDEFINES TEXT-RECORD.
03 TEXT-FIELD-1 PIC X(6).
03 FILLER-1 PIC X(5).
03 TEXT-FIELD-2 PIC X(20).
03 FILLER-2 PIC X(5).
03 TEXT-FIELD-3 PIC X(4).

I would like the FILLER-1 and 2 fields to be tab delimiters.

Any help would be highly appreciated.

Thanks in advance,

Kdelta




Platform MF NetExpress 3.1 on XP.
 
You need to disable the default Tab-expansion on file-I/O, but I can't find the setting for that now, I think it was a CobSW parameter.

Another way could be to use a different separator like a comma or a semicolon.
 
One way to disable the tab expansion is as follows:
Code:
77 R-C PIC S9999 COMP-5.
.
.
.
CALL X"91" using R-C X"2F" TEXT-FILE
 
Also, move X"09", as H"09" is numeric, and will convert to display.
 
use configuration switch -N or +N , not sure which one now but it will be mentioned on the runtime configuration manuals.

and as webrabbit said, move X"09" to the filler field.



Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
It's -N, and if used that way, it applies to all line-sequential files in the run-set at all times. The call applies the option only the the file specified, and only while it is currently open, which I forgot to mention (The file must be open when the call is made).
 
Hi,

Thanks for the help, it worked just fine.

Regards,

Kdelta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top