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

Partial load a table from production data to test


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

New User


Joined: 22 May 2008
Posts: 56
Location: hyderabad

PostPosted: Mon May 11, 2009 7:01 pm
Reply with quote

Hi
I need to load a table from production data to test with some restriction, say that i want only four years of data. For this I tried using when clause in unload, it failed as i was trying to do unload from copy. then i unloaded all data, and tried to use the when clause in the load control card, but again it failed. portion of the control card is given. please suggest the exact syntax.

DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = LOAD01
DSNU005I DSNUGPRW - LOAD DATA INDDN SYSREC LOG NO REPLACE NOCOPYPEND
DSNU005I DSNUGPRW - EBCDIC CCSID(00037,00000,00000)
DSNU005I DSNUGPRW - INTO TABLE "DEVT "."HIST_T "
DSNU005I DSNUGPRW - WHEN WO_OPEN_DT2 >='2003')
DSNU049I DSNUGPRW - INVALID OPERAND ''2003'' FOR KEYWORD 'WHEN'
DSNU005I DSNUGPRW - ( "PARTN_NO " POSITION( 00003:00003) CHAR(00
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Mon May 11, 2009 11:43 pm
Reply with quote

Hi mailsaurabh.tripathi

The usage of "WHEN" has different syntax.

Code:
 WHEN (51) ='D'

Here "(51)" denote the position in the I/P dataset and the 51st position of the I/P dataset must have character "D". Then that record will be loaded to the specified table.

If you post the unload control statement, sometime your problem can be easily solved.

Regards
Raghu
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 How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
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 Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top