How to Check Existence, Copy, Delete or Rename a Flat File?

Purpose of Document

 

How to check file existence, how to copy, delete or rename a file?
 

Disclaimer:
This document may contain information, software, products, services which are not supported by Oracle Support Services and are being provided “as is” without warranty.  

Please refer to the following site for My Oracle Support Terms of use:  
http://docs.oracle.com/cd/E25290_01/doc.60/e25224/preface.htm#MOSHP983

Using the suggested workarounds requires advanced knowledge of the JD Edwards EnterpriseOne toolset, including but not limited to using event rules, APIs, business functions,etc..
Although logic examples may be provided; field assistance will need to be requested if the customer requires more detailed development help with their implementation. These are billable activities that are not supported by Oracle Global Support.

 

 

 

The following Business Functions are available which can be used to perform flat file operations.

 

Detail explanation on each business functions:


B0500180 - OpsysFileOperations (Operating System File Operations Delete, Rename, File Exists)

Parameter NameData ItemData TypeI/OReqImplementation
cActionCode EV01 CHAR I  
  • D: Delete (szFileName1)
  • E: Existence to check whether such a file does exist or not for szFileName1
  • R: Rename (Copy szFileName1 and name it szFileName2 and delete szFileName1)
szFileName1 EXEP String I/O   Source file you want to delete/copy from
szFileName2 EXEP String I/O   Target file you want to rename to
cSetOneWorldErrorFlag EV01 CHAR I   This flag is to set hard code error or not
  • 0: do not stop process even if error
  • 1: set Hard Code Error
mnErrorCodeReturned MATH06 Numeric O  
  • 2 - Source File does not exist or the size is 0
  • 9 - Action Code Invalid
  • Action Code D - Delete
    • 1 - Source File (File Name 1) gets removed
  • Action Code E - Existence
    • 1 - Source File does not exist
    • 0 - Source file does exist
  • Action Code R - Rename
    • 3 - File Name 2 (Target File) is Null
    • 1 - Failed to rename it
    • 0 - Renamed successfully

  

 

Note:

  

 

 

Back To Top

 

B34A1030 - ExecuteExternalProgram (Execute External Program)

Parameter NameData ItemData TypeI/OReqImplementation
cSuppressErrorMessage SUPPS Char I   - 1: Suppress Error Message (You won't get any error in return)
- Else: Do not suppress
ErrorCode ERRC String O   3143 - File can not be accessed
szErrorMessageId DTAI String O   Value defined at F9207 for error code 3143
szCommandLine NFLF String I   Command line to copy file the size of command can be up to 512 characters


 

Note: For detailed usage of this business function, refer to <Document 636244.1> - E1: BSFN: How to use business function B34A1030 Execute External Program in EnterpriseOne

Back To Top

 

B4700230 - DeleteOrCopyFlatFile (Delete Or Copy Flat File)

Parameter NameData ItemData TypeI/OReqImplementation
szOriginalFlatFile TXTDIR String I   Source file name with path
szNewFlatFile NFLF String I/O   Target file name with path
cActionCodeOnFlatFile EV01 Char I  
  • 1 - Delete original flat file
  • 2 - Copy original flat file to new flat file
  • 3 - Delete both original flat file and new flat file
cSuppressErrorMessage EV02 Char I  
  • 1 - Suppress Error
  • 0 - Do not suppress error
cErrorCode ERRC Char O  
  • 1 - Error
  • 0 - Success
szErrorMessage DTAI String O  
  • 0003 - Either the original flat file or new flat file name is blank
  • 022U - Failed to read the original flat file
  • 1750 - Failed to write a new flat file
  • 0001 - Action Code is not 1 or 2 or 3

 

Note:
Intel
  \\ServerName\FolderName\FileName

Unix/AS400
 /FolderName/FileName (in AS400 IFS is root so do not indicate server name)
For detail, refer to <Document 1305796.1> - E1: 47: Representation of Path for EDI in EnterpriseOne

 

Back To Top