I use the below control statement with IEBGENER to convert the zoned decimal into packed decimal value
I want to load the resultant dataset into a DB2 table. The problem is that the resultant converted packed decimal value is an unsigned decimal and so the DB2 load is failing with error message 'INPUT PACKED DECIMAL IS IN ERROR'. When i manually converted this for testing purpose the load job was successful.
Can anyone please tell me how to generate the signed packed decimal value out of generate statement.
thank you for the hint, i tried with DFSORT but getting the unsigned packed decimal only in the output. The problem is the input data from which i am converting are unsigned numeric values. Below is the code i tried,
i really apologise for wasting all of your time. This is totally out of my stupid mistake. This is what has happened,
- i created a load file out of IEBGENER GENERATE and loaded it into a DB2 table
- i got an error message as invalid decimal data, since i am new to the DB2 loads i didnt noticed that there has been already some records processed successfully
- for testing purpose i just copied the first record into a new dataset and changed the sign bit and ran the load job again and it was successful, hence from there on my assumption was completely that the problem was the unsigned decimal
- the actual problem was there was an corrupted data (character) in decimal field
Once again i am sorry for this.
the upside for me is that i learned a lot on DFSORT utility:-)