Suppose I've a batch job which has previously run and created a flat output file of fixed record length. (The output file name will vary for each run of the job.)
I've a CICS program running in a server environment which will receive a request from a web browser for the job results, and I want to read the file and return the content. (Assume the specific file name to use will be included in the text.)
I'm trying to work out how to actually access the file in CICS.
I'd managed to dynamically specify the filename using CEEENV, but then discovered that I can't use the native OPEN/READ commands. I know there are CICS read and browse commands, but they all seem to require having the file defined to CICS beforehand? I've also seen references to using transient data queues to access sequential files, but again, the queue needs to be pre-defined.
The file won't have any particular structure or suitable key, so it looks like I should use the BDAM file commands. Which seems to require a FCT entry. But I can't find any decent examples of how to create that.
Obviously, the web service could be called frequently and concurrently, so I need some way of temporarily associating the file with a means of accessing it, which I can free as soon as I'm done with it.
Obviously, I'm not that familiar with the CICS environment. I feel like I'm either missing something simple, or there's a fundamental reason why this can't be done. Pointers towards either would be welcome!