Synthetic Data Generation for IMS

Document ID : KB000106298
Last Modified Date : 13/07/2018
Show Technical Document Details
Question:
I am trying to synthetically generate data for IMS and having some issues while doing this activity.

Here is the approach I am following:
1) Create the AFL file.
2) Register it on DM
3) Create the rules using data painter and publish to data pool.
4) Save the csv file and upload it to mainframe
5) Reloading the file to IMS is where I have some issues. I am getting invalid layout library error while loading it back to IMS.

I have a doubt that since I am using the data created by data pool and this Data set which I am uploading does not have any Segment name in it neither it has the records at the beginning of the file which normally are when we extract the segments. Then after some bytes from certain position we have the actual data starting for the segment.

Would reload process also take care of the packed decimals? In my published file from DM I have unpacked fields, will these fields be converted back to packed decimals after uploading them back to IMS DB using File master?

Please note: I want to follow this approach for now instead of using the shredding/unshredding jobs.
Answer:
To transfer the file correctly what you need to do is as follows:
1) Change the file conversion script that you are running - you should use the following settings:
     set OUTPUTMODE=LS
     set OUTPUTRECFM=
     set OUTPUTLRECL=
     set OUTPUTCODESET=EBCDIC

2) In setting up the transfer use the following options:
CRLF RECFM(V) LRECL(504)

The varying length records should then be correct. There may be a problem with the generated data in XCIFSER-LEVEL-2-XCIFSER-KEY - this currently contains a normal numeric in the last 5 bytes, whereas the key itself has a packed decimal (COMP-3) in the last 5 bytes. I don't know for certain if this would cause a problem for FM+ or not, if it does you will need to change the copybook to look something like this:
*****************************************************************
* CA File Master Plus for IMS Extract Layout
*****************************************************************
01 XCIFSER-EXTRACT-RECORD.
02 XCIFSER-EXT-CNTL-INFO.
05 XCIFSER-ACTION-CODE PIC X(01).
05 FILLER PIC X(01).
05 XCIFSER-SEGMENT-NAME PIC X(08).
05 XCIFSER-DBDNAME PIC X(08).
05 FILLER PIC X(02).
05 XCIFSER-FORMAT-CKEY-LEN PIC 9(09) COMP.
05 XCIFSER-SEG-LEN PIC 9(09) COMP.
05 XCIFSER-VAR-AREA-LEN PIC 9(09) COMP.
05 XCIFSER-ROOT-LOCATION PIC X(08).
02 XCIFSER-FORMATTED-CKEY.
05 XCIFSER-LEVEL-1-SEG-NUM PIC 9(03).
05 XCIFSER-LEVEL-1-XCIFPNM-KEY PIC X(24).
05 XCIFSER-LEVEL-2-SEG-NUM PIC 9(03).
05 XCIFSER-LEVEL-2-XCIFSER-KEY.
10 CUSTOMR-GIVEN-NAME1 PIC X(10).
10 CUSTOMR-GIVEN-NAME2 PIC X(10).
10 CUSTOMR-NUM PIC S9(09) COMP-3.
*****************************************************************
* Customer Segment Layout
*****************************************************************
02 XCIFSER.
05 XCIFSER-LENGTH PIC S9(04) COMP.
05 XCIFSER-KEY.
10 CUSTOMR-GIVEN-NAME1 PIC X(10).
10 CUSTOMR-GIVEN-NAME2 PIC X(10).
10 CUSTOMR-NUM PIC S9(09) COMP-3.
05 ADRES-POSTAL-C.
10 ADRES-POSTAL-C1 PIC X(03).
10 ADRES-POSTAL-C2 PIC X(03).
05 CUSTOMR-BIRTHDY PIC S9(05) COMP-3.
05 CUSTOMR-SEX-C PIC X(01).
05 SIN PIC S9(09) COMP-3.
05 ADRES-STAT-PROV-C PIC X(02).
05 CUSTOMR-HOME-PHONE-NUM PIC S9(07) COMP-3.
05 FILLER PIC X(20).

Create new record definitions from this, and set up a generation rule to populate CUSTOMR-NUM correctly in XCIFSER-LEVEL-2-XCIFSER-KEY