I have a need to generate a Tab Delimited file for export to an off the shelf program.
where can I find information on how to insert tab characters between data elements in a line seuential file.
I have a need to generate a Tab Delimited file for export to an off the shelf program.
where can I find information on how to insert tab characters between data elements in a line seuential file.
I have a need to generate a Tab Delimited file for export to an off the shelf program.
where can I find information on how to insert tab characters between data elements in a line seuential file.
You will have to do that programmatically. There is no automated way in COBOL.
Here is the general idea (all data items are USAGE DISPLAY):
MOVE SPACES TO LINE-SEQ-RECORD.
STRING DATA-ITEM-1 DELIMITED SIZE
X"09" DELIMITED SIZE
DATA-ITEM-2 DELIMITED SIZE
X"09" DELIMITED SIZE
DATA-ITEM-3 DELIMITED SIZE
X"09" DELIMITED SIZE
DATA-ITEM-4 DELIMITED SIZE
X"09" DELIMITED SIZE
DATA-ITEM-5 DELIMITED SIZE
INTO LINE-SEQ-RECORD.
WRITE LINE-SEQ-RECORD.
Be sure to use a device-name on the ASSIGN clause that removes trailing spaces from the record on WRITE operations. See Chapter 8 (File Types and Structures section) in the RM/COBOL Users Guide for additional information.
I have a need to generate a Tab Delimited file for export to an off the shelf program.
where can I find information on how to insert tab characters between data elements in a line seuential file.
new problem. I took the last suggeston using the STRING Command and was able to generate a file. my problem now is that records written to the file have random leading spaces in them. I tried manually shifting the data character by character and debug mode shows the data starts in position one of the output record. But only the first record starts in position 1. The second one is shifted 81 characters to the right and then the next 13 are shifted 18 characters. i am at a loss on what to do next.
I have a need to generate a Tab Delimited file for export to an off the shelf program.
where can I find information on how to insert tab characters between data elements in a line seuential file.
Please post your test program.
Adding a file to a post on this forum is not obvious. First, click on the 'Use rich formatting' and type in your reply. Then click the 'Options' tab. There you will find a link that allows you to add a file.
Or, you can post you response, then click on the pencil icon to edit your post, and you will have the 'Options' tab.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.