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

excel file format

Status
Not open for further replies.

slade

Programmer
Jun 11, 2000
823
US
Hi All,

I could use some help. I'm a COBOL pgmr who has to create a file in "excel format". Where could I go to get this kind of info? Any thoughts and/or suggestions would be greatly appreciated.

Thanx, Jack.
 
Create a text or ascii file with a delimiter (such as ";")that separates the data to go inot columns into EXCEL. Open that file with EXCEL and chose Data tab then select "text to columns", then delimited.
 
I use the TAB delimiter, X'05', on the mainframe. It translates to an Ascii TAB, hex '09', and Excel will process it. It is unlikeky that mainframe data will contain the TAB but it could contain a semi-colon. You can use the STRING verb to put things together.
Code:
MOVE 1 TO WS-NEXT-BYTE
STRING Acct-NO WS-TAB Cust-Name WS-TAB Dollars
    DELIMITED BY SIZE INTO WS-OUTPUT
    WITH POINTER WS-NEXT-BYTE
STRING WS-TAB more-data 
    DELIMITED BY SIZE INTO WS-OUTPUT
    WITH POINTER WS-NEXT-BYTE
All data must be in DISPLAY format for proper translation. Any signed numeric fields should be output with SIGN IS LEADING or TRAILING beacuse EXCEL is not going to recognize EXTERNAL SIGNED DECIMAL.
 
Hi John, MSU,

Thanx for the promt replies. Some follow-on ques, if you don't mind. Is there a fixed/limit rec size? John, in your example, you showed 2 STRING stmts. Could that be done in 1 or am I missing something? Are there hdr/trlr recs? Is this all I have to know? If not, is there a site or book I can use?

Thanx again for your help.

Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top