Flat file creation for the web.

PSFT

Member
We are converting from fat client to thin client while on release 8.10. We've got everything working okay now except the one application process we still have that outputs a flat file(.TXT basically).

We used to dump it on hard drives of the couple of people running the program. C:myfile. We can do that, punch it to a shared Windows server, or put it on the AS/400 in one of their file formats where our data is. Any are acceptable, but I can't consistently get an Export, OPEN/WRITE or R47002C to work in local development, run on the server, or in the web environment. Exporting from a grid is not acceptable for this purpose, due to the nature of the data.

I have a strong suspicion that some of my failures are security related, but it's a little hard to prove.

If anybody can tell me a mechanism that works in their web environment, so I know I'm not going down a blind alley, then I can get a consortium formed to convince it to work here.

Thanks!

E8.10/7.13/AS400
 
We use a Windows share on the production Application Server. I get the location from a processing option. Based on the environment, I save the text file in a separate folder (DV / PY or PD).
Works like a charm after our SysAdmin configured the Active Directory properly (yes, the permissions on that share)
grin.gif
 
PSFT,

We mainly do the same as Adrian, put the text file in a shared location. In addition we sometimes email the file to the user.
 
Thanks for responding. Once you get the filename/environment from your procopt, what command etc. do you use to write to the file? That's the part I need.

One of our processes used that procopt filename input construct, and an "Export to Flat File" business function call. No file was created that we can find when testing. Our sysadmin people were confused, but no solution was forthcoming.

That's why I need to know what output mechanism absolutely worked for somebody else, so I can pitbull it through the layers here.
 
PSFT,

Below are some business functions I use for dealing with text files. I hope they are what you need.

Source Module: B0500180
Description: Operating System File Operations Delete, Rename, File Exists
Business Function:
Name: OpSysFileOperations
Description: Operating System File Operations Delete, Rename, File Exists

Source Module: B34A1010
Description: Flat File Operations
Business Functions:
Name: CloseFlatFile
Description: Close Flat File
Name: OpenFlatFile
Description: Open Flat File
Name: WriteOneLine
Description: Write One Line To Flat File

Source Module: B76B0220
Description: Flat File I/O Functions - 03B
Business Functions:
Name: AppendLineToFlatFile
Description: Append Line to Flat File
Name: FetchNextLineFromFlatFile
Description: Fetch Next Line from Flat File
 
That is exactly what I needed, in combination with Adrian's answer! Now I can send a certified functional (elsewhere) set of code to the web and basically dump it on somebody else's to-do pile if it can't produce a file from there. Once that gets cleared up, I think our production program will probably work as written too. At least a MILLION thanks for the help!
 
Post-mortem for anybody else who stumbles into this. There was a magical directory created that the system knew to use for this purpose. The Open-Write-Close just needed to list filename.ext as a parameter, and it went there. EXPORT remains somewhat under suspicion.

What's really suspicious, and we'll verify it tomorrow, is the event in which you OPEN the file. It appears to me that the old code which issued the OPEN in the Initialize event no longer works, but an OPEN in the Do section does. I will confirm or deny that tomorrow.

Our CNC continues to work with Oracle on placing the file in a runtime directory of our choosing.
 
Back
Top