Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: mf cobol data file path

$
0
0
I am not sure what you mean by "rm project". Do you mean a managed console application that generates an .exe file? This should work with the app.config. I can get this to work in a Class Library project called from C# using the following simple example: $set ilsmartlinkage program-id. testcobdata as "testcobdata.testcobdata". $set filetype"21" select test-file assign to "Z-SOMPR-FL" organization is indexed access mode is dynamic record key is key1 file status is file-status. data division. file section. fd test-file. 01 test-record. 05 key1 pic 9(3). 05 rest pic x(20). working-storage section. 01 file-status pic x(2) value spaces. 01 ws-field pic x(30) value spaces. linkage section. 01 myparams pic x(20). procedure division using myparams. display "COBDATA" upon environment-name accept ws-field from environment-value open input test-file display file-status goback. C# main program: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace testcsMain { class Program { static void Main(string[] args) { Console.WriteLine("In C#"); Environment.SetEnvironmentVariable("COBDATA", "c:\\testcobdata\\files"); testcobdata.testcobdata tc = new testcobdata.testcobdata(); Myparams param = new Myparams(); param.Myparams = "from C#"; tc.testcobdata(param); }

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>