Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Validate column value while loading a table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Validate column value while loading a table
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

Site Director


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

PostPosted: Thu May 14, 2009 2:44 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts loading a Modified Mapset Susanta CICS 2 Tue Mar 14, 2017 5:43 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us