5 Import Using Z File Processing

You can run several interactive programs in batch mode which accept data from a Z file. This allows you to process mass amounts of data from an outside source easily and efficiently using existing programs to validate the data.

You can process any number of records to add, change, or delete. You also have the advantage of:

  • Using data selection to limit the records you want to process.

  • Setting the processing options.

Certain programs allow you to process a few of the data fields from the interactive program so that you can change the records. That is, the entire record does not have to be available for change, as required when using the import process. Programs that allow you to perform a partial record change include a processing option for this feature.

You can enter the data into a CSV or XML file and then import the data into a Z file for an interactive program. You can use the Batch Import - CSV or Excel XML or Batch Import from JDE XML on the Import/Export menu (G00PCIE) to import the data into the Z file. See Chapter 2, "Overview to Import/Export" in the for more information about Import/Export.

In most cases, the DREAM Writer program number corresponds to the screen and program number with a Z appended to the end. For example, P1230Z corresponds to the Depreciation Expense Allocation program P1230 and P1235Z corresponds to the Warranty Revisions program P1235. In some cases, a sequential number is appended to the end.

This chapter includes the following topics:

5.1 Z Files

A Z file is a standard J D Edwards World file that stores the data that you want to process into the system. The Z file includes all key fields and input fields available on the screen. The program creates one or two Z files per program. Programs with subfiles contain two Z files. The Z file number is the same as the program file number appended with a Z. For example, the Z file number for Address Book Information (P01051) is F01051Z. For subfile programs, the header Z file number is the same as the program file number appended with HZ and the detail Z file is the same as the program file number appended with DZ. For example, the Z files for P1230, include F1230HZ and F1230DZ.

5.2 Z File Fields

The Z file includes a few required control fields as well as hidden fields that are necessary for changing or deleting existing records. The control fields are unique to each record you process and tie the header to the detail data for any subfile record that you process. You can identify the hidden fields as those that begin with SH. For example, SHxxxx where xxxx is the data item name. You must enter the identifying values for the original record in the hidden fields when you want to change or delete records. The hidden fields must not contain data when you are adding records. Any hidden date field should be in Julian date format, to match the values in the production file. J D Edwards World recommends that you right justify any numeric fields in the Z files. You must right justify any key fields that the system needs to match between the header and detail files.

The following control fields are in the flat file or header file:

Field Explanation
User ID

Batch Number

Transaction Number

These fields uniquely identify the record. You sequentially number records within that User ID and Batch Number using the Transaction Number.
Transaction Action Enter A, C, or D, depending on which action you want to perform (Add, Change or Delete respectively).

NOTE: Valid transaction actions depend on what action codes the interactive program allows and how action code security is set up.

Processed Y/N The Processed Y/N field should be blank or 'N'. When the program successfully processes the record, via the interactive program, this field is set to 'Y' automatically.

The following fields are in the detail file (for example, F1230DZ):

Field Explanation
User ID

Batch Number

Transaction Number

These fields tie the detail record of the subfile to the header record. These three should match the associated header file values.
Line Number This uniquely identifies each of the detail records in the file associated with a header record. This should be a sequential number.
Processed Y/N The Processed Y/N field should be blank or 'N'. When the program successfully processes the record, via the interactive program, this field is set to 'Y' automatically.

5.3 Processing Batch Z Files

When you run the batch Z File program, a DREAM Writer launches the interactive program in batch mode based on F00BLOG. The interactive program examines the Z file for all unprocessed records in the batch. The program processes each Z File record and creates a log file (F00BLOG) with successful or error transaction messages. You can also choose to print a report with these messages.

For some programs with subfiles, it is possible that some detail processes successfully and some does not, due to errors. If the program halts processing with a subfile error, the program processes only those records up to that point.

5.4 Report

Review the Error Message report (R00ZERR for release A9.3 or R41ZERR for release A9.2) to determine if errors exist, and, if so, evaluate and correct these in the Z File before running the program again. If a message states Transaction Successful, the Processed field in the Z File record contains a Y and the program processed your add, change, or delete.

You can identify the messages in the F00BLOG by the Process Name field; which is different for each Z file processing program. For example, the Process Name field for Address Book Information (P01051) is A/B_ZFILE and for Depreciation Expense Allocations Revisions (P1230), it is FA_DEPEXP. J D Edwards includes DEMO versions of the report for most of the Z file programs or you can create your own version. When you use a DEMO version, the version selects the appropriate process name. For example, ZJDE0005 of P00ZERR is for address book processing and selects A/B_ZFILE. This allows you to use or create a version of the report for each program so you don't have data in the report for all Z file programs. You enter the version of the error report you want to run in the Error Report processing option.

5.5 Purging Data

When you are satisfied that your records processed correctly, you can use the generic purge program (P00PURGE) to purge the F00BLOG file as well as the individual program Z files.

5.6 Technical Considerations

If you need to locate the Z files and programs for analysis or to set up Z file processing for custom applications, you need to be aware of the following:

  • The Function Use Code for interactive Z File files is 232. This will enable you to locate all programs and files available for Z File Processing using the Function Use Code number as the search criteria. From the search results list you can easily determine which of the interactive programs are available for Z File processing.

  • All Z File fields are character fields, as they are on a screen. If you are customizing a Z file, you cannot use the File Design Aid facility to update the actual Z files, you must use a code editor such as the IBM Source Entry Utility (SEU). In addition, the File Prefix in the Software Version Repository (SVR) is not always in use with the Z files. To reduce the probability of error in the future, the SVR immediately invokes SEU when editing any files with the Function Use Code of 232. This allows you to define the file fields and file prefix without using the Data Dictionary definitions via the Reference Files and the SVR File Prefix.

5.7 Menu

There is one Z File menu for each system and it is in the format of GSSXXZ, where SS is the system code and XX is a sequential number. For example, all Address Book Z File programs are on menu G0101Z.

5.8 Processing Options

Depending on the program, batch Z file or interactive, set the processing options for greater flexibility.

Program Processing Options
Z File Each batch Z File program includes two or three processing options.

The two Error Reporting processing options are always available.

The Interactive Program to Process the Records processing option is available if the interactive program includes versions. If the interactive program does not include processing options, this processing option is not available.

Interactive Only those interactive programs that allow partial record changes include a Z File processing option for this task.

This processing option allows you to determine which character you want to use to clear fields.

Setting this processing option with a character, such as @, permits you to clear fields (blank or zero) and to disregard all of the other fields. You enter @ in the fields you want to clear and enter information in the other fields. If you leave the processing option blank, the program makes no changes. Key fields are necessary to retrieve the record so you should not enter the character into the key fields.


5.9 Data Selection

Do not remove the existing data selection. The Processed Y/N field is set to NE Y. This prevents the program from processing records more than once.

You can add additional selections to limit the data.

5.10 Data Sequence

Do not change the data sequence.