E9.2 Get file names of the files located on an external server

BXK

Member
We are on E1 9.2 TR
9.2.7.

I am looking for a way to read the file names only not the file content of the files located on a server which is outside of E1 from a E1 UBE.

Please suggest how to accomplish it.

Thanks,
 
Hi BXK

Let your OS do the work, by using the Business Function Execute External Program. Create a batch program to run a directory command to list the file names you need and direct the output to a file. Use Execute External Program to run your batch program. Then use another business function (or functions) to read the output file line by line to get the file name in JDE.

WARNING: Be careful of the OS security for the OS user ID under which JDE is running. If that OS user ID does not have access to the directory involved it will likely return an error saying directory does not exist. The OS user ID will also need access to all the files for which you want the names. If it does not, the files to which the OS user ID does not have acces will not be returned.

Below are most of the standard business functions I used for working with Flat/Text files before I retired. The ones you will probably need are in Italics. None are client only. I used them on Windows and Unix computers. I do not have personal experience with other OS's. They all existed in E9.1 TR9.1.2.1 and I would expect that most would exist probably back to Xe or before.

Function Name:; OpSysFileOperations
Souce Module: B0500180
Description: Operating System File Operations Delete, Rename, File Exists

Function Name:; GetNewLineCharacter
Souce Module: B0800207
Description: Get New Line Character

Function Name:; CloseFlatFile
Souce Module: B34A1010
Description: Close Flat File


Function Name:; OpenFlatFile
Souce Module: B34A1010
Description: Open Flat File


Function Name:; WriteOneLine
Souce Module: B34A1010
Description: Write One Line To Flat File

Function Name:; ExecuteExternalProgram
Souce Module: B34A1030
Description: Execute External Program


Function Name:; DeleteOrCopyFlatFile
Souce Module: B4700230
Description: Delete Or Copy Flat File

Function Name:; ConvertCRLFtoHex
Souce Module: B7400150
Description: Convert CR And LR to Hexadecimal

Function Name:; AppendLineToFlatFile
Souce Module: B76B0220
Description: Append Line to Flat File

Function Name:; FetchNextLineFromFlatFile
Souce Module: B76B0220
Description: Fetch Next Line from Flat File
 
Hi BXK

Let your OS do the work, by using the Business Function Execute External Program. Create a batch program to run a directory command to list the file names you need and direct the output to a file. Use Execute External Program to run your batch program. Then use another business function (or functions) to read the output file line by line to get the file name in JDE.

WARNING: Be careful of the OS security for the OS user ID under which JDE is running. If that OS user ID does not have access to the directory involved it will likely return an error saying directory does not exist. The OS user ID will also need access to all the files for which you want the names. If it does not, the files to which the OS user ID does not have acces will not be returned.

Below are most of the standard business functions I used for working with Flat/Text files before I retired. The ones you will probably need are in Italics. None are client only. I used them on Windows and Unix computers. I do not have personal experience with other OS's. They all existed in E9.1 TR9.1.2.1 and I would expect that most would exist probably back to Xe or before.

Function Name:; OpSysFileOperations
Souce Module: B0500180
Description: Operating System File Operations Delete, Rename, File Exists

Function Name:; GetNewLineCharacter
Souce Module: B0800207
Description: Get New Line Character

Function Name:; CloseFlatFile
Souce Module: B34A1010
Description: Close Flat File


Function Name:; OpenFlatFile
Souce Module: B34A1010
Description: Open Flat File


Function Name:; WriteOneLine
Souce Module: B34A1010
Description: Write One Line To Flat File

Function Name:; ExecuteExternalProgram
Souce Module: B34A1030
Description: Execute External Program


Function Name:; DeleteOrCopyFlatFile
Souce Module: B4700230
Description: Delete Or Copy Flat File

Function Name:; ConvertCRLFtoHex
Souce Module: B7400150
Description: Convert CR And LR to Hexadecimal

Function Name:; AppendLineToFlatFile
Souce Module: B76B0220
Description: Append Line to Flat File

Function Name:; FetchNextLineFromFlatFile
Souce Module: B76B0220
Description: Fetch Next Line from Flat File
Thanks Peter for the details and the list of BSFNs.
 
We are on E1 9.2 TR
9.2.7.


I am looking for a way to read the file names only not the file content of the files located on a server which is outside of E1 from a E1 UBE.

Please suggest how to accomplish it.


Thanks,


Logic and Puzzle Games: Catchmod free puzzle games help improve players' logical thinking and problem-solving abilities. From puzzles to fun puzzles, players will enjoy hours of relaxation at no cost.
In E1 9.2.7, to read only filenames and not content from an external server in UBE, consider using the directory listing functions. These functions help to access the file name without accessing the file contents. You can refer to the E1 documentation for specific implementation steps.
 
If Orchestrator is an option, you can get a directory listing using JRuby. The service account for Web Logic or WebSphere would need to have access to the folder. Here is a link to how to work with directories in Ruby.
 
Back
Top