185 pts.
 Using AS400 COBOL or CL Program to Call an Excel File and Pass Parameters Back and Forth from 400 to Excel Back to 400
[html xmlns=""> I am beginning my investigation to figure out how to use either a 400/COBOL program or a CL program to call an excel spreadsheet that requires three parameters to a calculation and to return a value back to my 400/COBOL program of CL program so that I then can use that value in my program as needed. I am not sure of the mechanism to do this. Data queues, TCP/IP, etc.

Software/Hardware used:
ASKED: September 29, 2010  1:58 AM
UPDATED: September 30, 2010  6:53 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

Do you already have a working PC program that can provide the wrapper you’re going to need? If you have such a program that can provide the three values, call Excel to process the spreadsheet, and then extract the required value from it, it’ll be fairly easy to work out a remote call for it.

Or I suppose you could write COBOL routines to insert values into a spreadsheet in the IFS, then do remote call to Excel to open the spreadsheet. You might then have macros that would auto-calculate a fourth cell value and close the spreadsheet. After Excel finished, you’d have another routine to extract the value from the result cell. There are Java APIs that could be used from COBOL. I’m not sure if any of them can help; but if you know how to make Excel run without human input, it should be possible.

It sure seems like an incredibly complex way to get something done though.

Tom

 108,055 pts.