5 pts.
 How can I export data from mainframe to Excel in REXX
i want to export data in PS to excel through rexx code.As i am a beginner in REXX .can any one help me in this .

Software/Hardware used:
ASKED: May 11, 2009  6:13 AM
UPDATED: August 12, 2011  8:34 AM

Answer Wiki:
Laks143, Whenever I want to do this, I work with tab delimited text. Since a tab is equal to a hex '05', you can easily incorporate that into your output. Below is an example where I am reading in an Excel spreadsheet, saved as tab delimited text. I'm then creating a new column, and writing the new rows back out to the same file. The new file can then be opened from Excel, and the import wizard can parse out the columns using the tabs. Hope this helps! Karl /**************************** REXX **********************************/ /* CODE TO READ IN A TAB DELIMITED TEXT FILE, ADD A NEW COLUMN, AND */ /* WRITE THE RESULTS TO THE SAME FILE, AS TAB DELIMITED TEXT. THIS */ /* FILE CAN THEN BE IMPORTED TO AN EXCEL SPREADSHEET. */ /**********************************************************************/ "ALLOCATE F(INFILE) DA('USER.EXCEL.TEXT') SHR" "EXECIO * DISKR INFILE (STEM LINEIN. FINIS" "FREE F(INFILE)" DO A = 1 TO LINEIN.0 PARSE VAR LINEIN.A COL_A '05'X, COL_B '05'X, COL_C '05'X, COL_D '05'X, COL_E '05'X /* MAKE NEW COLUMN. */ COL_F = COL_A||'+'||COL_B||'+'||COL_E /* BUILD NEW ROWS FOR NEW SPREADSHEET. */ LINEOUT.A = COL_A||'05'X||, COL_B||'05'X||, COL_C||'05'X||, COL_D||'05'X||, COL_E||'05'X||, COL_F||'05'X END "ALLOCATE F(OUTFILE) DA('USER.EXCEL.TEXT') OLD" "EXECIO * DISKW OUTFILE (STEM LINEOUT. FINIS" "FREE F(OUTFILE)"
Last Wiki Answer Submitted:  May 13, 2009  7:51 pm  by  Kwkanne   145 pts.
All Answer Wiki Contributors:  Kwkanne   145 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

If you know what the data looks like you can use the rexx ole class (granted I am using OOREXX). Add a Requires OREXXXOLS.cls
http://www.rexxla.org/events/2004/ronyf1.pdf

 10 pts.

 

Hi everybody,
I used to build files on MVS for excel purposes.
I use the same method, that, the one of Laks143.
I prefer to user the character comma.
It is recognized by EXCEL, and visiually speaking it’s more readable.
And you have not some problems of versions EBCDIC to ASCII.
Regards.

 25 pts.

 

Hi,

Can u please tell how & where to allocate the excel sheet?? 
I mean USER.EXCEL.TEXT is it a PS???
How will it pick from the desktop??
 10 pts.