D Universal File Converter

This chapter contains these topics:

D.1 About Universal File Converter

This is a simple, single file to single file walk-through of the JD Edwards World World Universal File Converter (UFC). A major benefit of using UFC is that once the process has been tested, it can be made into a production process using a Dream Writer version.

The UFC is written to map data character-by-character from any physical file resident on the System I (iSeries / AS400) to any other resident physical file. If the input file is from a PC spreadsheet, that file will have to be ported (FTP or other process) to the iSeries.

Caution:

To protect your production data, create a test library and put a copy of the "from file" and the "to file" with its attached logicals into it. There may be a logical file attached to the "to file" with a "unique" key requirement. By having this file attached during the UFC process, all the key field requirements will be fulfilled.

D.2 Sample Conversion

There are 2 pieces of information to gather:

  • The format name

  • The number of records in the file

The record format name will be used in the last step. The number of records should be 100 or less for the initial testing. During testing, the number of records can be used to make sure all records were read. When the conversion has been tested successfully a full-file test can be made.

You will also:

  • Identify from and to files

  • Map data

  • Convert data

To gather format names

  1. Do a DSPFD on the "from file" in your test library.

  2. Page down to the last panel.

  3. Write down the Format name and the number of records in the file.

To identify from and to files

  1. You will need to be signed on to JD Edwards World World. You must have an F0031 file in this environment. Go to menu G9841.

  2. Selection 2 will take you to a versions list for P00120.

    • Make a copy of the XJDE0001 version. Use your version name and title to tie it to the data you are converting, for example ABCONV and "Address book conversion."

    • Do not make any changes on the Additional Parameters screen. The based on file should be *NONE and the Format name should be INONE.

    • On the processing Options screen, enter the "from" and "to" file names. If either file is set to JD Edwards World file = "Y", numeric field names will be looked up for decimal point information. Page down to enter the test library name.

    Processing options three and four pertain to the library for test data.

    • Upon returning to the Versions List, run your version. P00120 will find the "from" and "to" files and create a record in the F0031 for each field in these files. If P00120 has no print files after it runs, it was successful.

To map data

Selection 3 takes you into the crossover rules. This is where the mapping details are entered. P00120 is pre-loaded.

Inquire on the version name you created and ran in Step 2.

The program in Step 2 above attempts to match field names. Any field with no match will have **FILLER for a Field Name. If **FILLER is on either the "From" or "To" side, the data will not be mapped. If the "From" side has fewer **FILLER fields, do an F8 to remove them. If the "To" side has fewer, do an F9.

The remaining fields will be in alphabetical order, not by position within the record. UFC is usually used to bring data into a JD Edwards World file, so that assumption will be used in this exercise.

Pick a field on the "To" side that you want to map into. Start with the field name on the "From" side and key in a meaningful field name. Use F14 to enter additional documentation.

The system highlights Fields that have additional documentation.

Set the "From" field "type" to A for Alpha. This is the most inclusive data type and will be used for numeric fields as well.

You will need to know where the data to be mapped starts in the input record. UFC moves data character-by-character, so if the input data has leading spaces, increment the "Begin Pos" field to skip over them. Similarly, on the "To" side, manipulate the "Begin Pos" as necessary so the data will be mapped correctly. The field names are not important to the process. The type, position and length values are important.

On the "To" side, the type can be "A", "S", or "P" for Alpha, Signed or Packed. "A" fields will have the "Byte" field set to the length of the data and the "Dig" field should be 0. "S" fields should have the "Bytes" and "Dig" fields set to the same value. "P" fields should have the "Dig" set to (("Bytes" x 2) - 1). It takes 8 bytes to hold 15 packed digits. In most cases, the "Dec" field will be 00.

Open the fold with an F4. Do F1 on the "Conv Rule" field. The most used functions are the date formats, *DFT and *NN. Most file dates are stored in Julian format in JD Edwards World. The incoming data should be 6 digits long and will probably be in a *MDY or *DMY format. On the "To" side, the field will also be 6 digits long but will have the *JUL format. The *DFT rule has room for 6 contiguous digits of data. *NN uses the first four digits for system code and the next 2 for the bucket number.

When all the incoming fields with data have been mapped, put "C" in the action code and press enter. All fields in the "To" file will be initialized to the proper empty format if not mapped.

At the top of the screen, you can inquire with the name of an additional file that you're mapping data to. Go through the above steps to map the data.

F3 back to the menu.

To convert data

  1. Selection 4 takes you to the versions list for P00111.

    • Copy version XJDE0001 and give it the same name and title as in Step 2a for continuity purposes.

    • On the Additional Parameters screen:

      • Enter the input file name in the Based on file field.

      • Press Enter.

      • Press F12 to return to the Additional Parameters screen and make sure the format name is the one from the DSPFD command in the preparation step.

      • Press Enter.

    • Processing option 1 needs the version of P00120 from step 2 so it can find the right crossover rule records in the F0031.

    • For options 2, 3, and 4, enter the appropriate file and library names.

    • Option 5 is usually set to 1 to clear the file so just the records from the latest conversion will be there.

    • Option 6 is usually blank.

    • Leave the data selection and sequencing screens alone. They are used for the OPNQRYF statement. Since we want to use the full file, they don't apply.

  2. From the versions list, run your version.

    • There should be a R00111 in the spool files. At the bottom it will tell you how many records were read and written.

    • Do a DSPPFM on the "to" file to see if the mapping is correct. In order to see all the data, you may want to do F10 followed by F11 to see the hexadecimal representation of the data in an over/under presentation. There will be an "F" or "D" sign in the bottom row at the right hand end of a packed field. Read that data by reading backwards from the sign in an up and down manner.

D.2.1 Trouble Shooting

Steps to consider

Ensure that you did perform the following:

  1. Set up and run step 2 on the menu 9841(P00120).

    • You should not change anything on the DW additional parameters.

    • You must enter the file and library names in the Proc Opt.

  2. Map only the fields they want in the FROM and TO files on the crossover rules screen. **FILLER fields will be ignored and the fields will be created empty, either blanks or zeros.

  3. Enter the correct format name for the based-on file(FROM) in the Additional parameters screen of the P00111 DW.

    • Check this with DSPFD of based-on file.

  4. Try changing the file output type for P00111 from 1 to 2 or from 2 back to 1.

    Note:

    Sometimes LF works, sometimes OPNQYF.
  5. Check the output file with a DSPPFM to see if there are any records created.

Factors to consider

  1. Current JD Edwards World release level

  2. Additional factors for each step

    • If Step 1: Check the Additional Parameters for the Based On File to be *NONE and format INONE.

    • If Step 2: Check if the you ran the Dream Writer in Step 1 to ensure you are setting the action code to C when changing cross over rules.

    • If Step 3: Are you getting any records in the To file?

      • Yes: Check the cross over rules.

      • No: Use DSPFD on the from file to identify the format ID and verify the correct format is in the additional parameters of the conversion Dream Writer (P00111).

    Note:

    If you are on release A7.1 or above and using *DFT in the cross over rules, you needs a paper fix.
    • After making any changes to steps 2 or 3, rerun the conversion.

Additional items to consider

  • The all time leader in UFC errors is an incorrect format name for the Based on (input) file on the Additional Parameters screen for P00111. Do a DSPFD on the From file and go to the bottom of the display to determine the format. Option 3 from G9841.

  • Do not change anything in the additional parameters screen on the P00120 form. After entering the file names and libraries in the Processing options, you need to run the Dream Writer version. Option 1 from G9841.

  • Problems writing to output file (in P00111) may be because of duplicate keys. Check if the To file has a logical attached that has a unique key and verify the user is not populating that field with blanks.

  • File output type in P00111 Dream Writer additional parameters should be a 2 for logical: for some JD Edwards World file to JD Edwards World file conversions (DDS files), a 1 for OPNQRYF is necessary.

  • There are many conversion rules in UFC to cover most situations, try them first before using custom Xxxxx programs.

  • Use F6 to pull up full information about both fields on the Cross Over Rules screen.

  • Use reference field in the fold area of cross over for those conversion rule entries that refer to the Data Dictionary.

  • You need only map the fields that you are concerned with. If some fields are not being initialized correctly to *ZEROES or *BLANKS, you might have to find a one byte field of the right persuasion and move it into that field (longer length will be accommodated) or use *DFT.

  • The UFC does a character at a time move of the data from the input file data location into the output file data location. For this reason it is not suited to large, repeated data transfers. It is suited to one time data file conversions or small scale frequent data import situations.

  • When using *DFT if the literal is over 6 positions then part it out as if dealing with two fields.

  • When having problems with going from zoned or signed to a packed field, call it alpha to packed forcing UFC to go through the C0012 to edit the data.

  • When having problems with going from packed to alpha, try packed to signed.

  • When having problems with alpha to signed, try alpha to alpha.

  • *If all looks correct, check for multiple F0031 files, you may be executing out of the wrong cross over rules.

  • If you get a duplicate key message in the joblog, it is because there is a unique key on the physical or logical. You may not be populating one of the fields in the key and this may create the problem.

  • Set most of the FROM fields to type A for alpha.

    • Numeric TO fields can be P for packed or S for signed.

  • Sometimes P00111 will have problems with the input file.

    • On the Add'l parameters screen, if the file output type is 1, change it to 2 and vice versa.

  • Make sure the P00111 based-on file and format names are correct. See Step 4(b).

  • There may be just one record in the "to file" and a message in the Joblog about a duplicate record.

    • Do a DSPFD on the file and its logicals to see which one has the "unique" key requirement. You will need to map data to each of the key fields. If there is no matching data, maybe a *NN conversion rule will have to be attached to one of the key fields as a tie breaker.