IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Validate column value while loading a table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Thu May 14, 2009 1:54 am
Reply with quote

Hi,
Right now, we have a cobol program which checks for a specific value in input file.
Example if WS-Column10 > '1000', then make the same WS-Column10 as '1111'
Then this record is inserted into a table.

For performance issues, I want to use LOAD utility instead cobol program.
I know we can use FINDREP function from DFSORT to perform this particular edit and use the output to LOAD.

However, I want to know if there are any parameter exists in LOAD which I can use for the same.
Like a field validation while loading, except this is not a NULLIF condition.

Not sure if this exists in LOAD utility. Any pointers will be of great help.
Maybe this is a naive question for experts here, pls help.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 14, 2009 2:44 am
Reply with quote

Hello,

I believe creating the load file, then loading it is the way to go (as you already are).

LOAD is not meant to implement "business logic".

Using sort to copy the file and change the value will be faster than "own code". The only caution is that if the requirement to build the load file grows, the sort may not be the better tool.

How is the file created now? Might the value be changed "upstream" so that no change is needed at load time?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top