View previous topic :: View next topic
|
Author |
Message |
prasenjit_dey
New User
Joined: 30 Apr 2008 Posts: 20 Location: Noida
|
|
|
|
Hi all,
A new column has been added to a table in DV01. I have unloaded the PR01 data of the table into a dataset.
Now i want to load the PR01 data to the DV01 table, but here i am facing a problem. Since the PR01 dataset doesnot have any entries for the new column when i try to load that data set iget an error msg that
INPUT FIELD 'xxx_xxx_xxx_NR' NOT ENTIRELY WITHIN INPUT RECORD
I tried fixing this by trying to provide a default value to the column in the load card
xxx_xxx_xxx_NR POSITION(825) CHAR(10) DEFAULTIF xxx_xxx_xxx_NR='0000000000')
But this didnt worked.
Please reply ASAP! |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Hi,
I also faced similar challnges during loading of a table. Using SORT, I have provided default value to the input file (instead of giving default value in load card itself) as per table structure and loaded into table. |
|
Back to top |
|
|
prasenjit_dey
New User
Joined: 30 Apr 2008 Posts: 20 Location: Noida
|
|
|
|
Hi,
I tried to add values in the output data set through Batch file aid. I had issues in that.
Anyways i gave the condition as
$$DD01 COPYALL IF=(18,8,NE,C'')
MOVE=(825,10,C' ')
There must have been some error in the condition.Though i wasnt able to find.
Anyways i overcame this problem with a solution that is not a good one but well in emergencies it works.
Copied the dataset to a new one and increased the LRECL and BLKSIZE, so the new dataset had spaces for the last filed since it did not find any value for that in the i/p.
Thanks and if you have any other solution please feel free to share. |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Quote: |
Copied the dataset to a new one and increased the LRECL and BLKSIZE, so the new dataset had spaces for the last filed since it did not find any value for that in the i/p.
|
This is a very bad practice. Do you have DFSORT in your shop? If so, include a SORT step to assign default values into the filed of the input file and then execute LOAD step.
Otherwise you can write a sample COBOL or Easetrieve program and move all the existing values into output file and default value (or spaces, zeroes) into the needed field. |
|
Back to top |
|
|
|