I’m currently working on a project using C# and SQL Studio 2010 that needs to communicate with our legacy program running on the AS400. We have access to a 3rd party suite called ASNA that allows dotNet to compile RPG code and can transparently access ISeries and MS SQL Stuidio.
We have a batch job that needs to return its results (numbering perhaps 300,000+ items) to the AS400. We typically use WCF services, but we fear that this may be too much data.
Here are some options we have considered:
- WCF service that iterates over the data in chunks
- Produce a text file with necessary data changes and FTP it to a folder for the AS400 to read from
- Give read only access from the AS400 to a table with the relevant data
Should we allow read access to a table or keep complete separation of the systems?
Is there any reason you can’t just use SQL to write the data directly to the AS/400 from within your batch job?
If you want to “keep complete separation of the systems” then you could certainly create a text file and FTP it to the IFS on the AS/400 – but you would then have to write software on the AS/400 to parse that text file and put the data into the appropriate physical file(s) (tables).
Without knowing the specifics of your organization I can’t answer your question “Should we allow read access to a table or keep complete separation of systems?”. Based on the places I have worked these are the options I would choose in order:
1) Use SQL to write data directly to the AS/400 from within the C# batch job.
2) Have a scheduled job that runs on the AS/400 and reads data from the Microsoft SQL Server.
3) Create a text file (probably a CSV file) and FTP it to the IFS on the AS/400 where I would then have a scheduled job run to parse the data.