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

unload DB2 Table


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

New User


Joined: 17 Dec 2009
Posts: 3
Location: chennai

PostPosted: Wed Apr 21, 2010 11:26 am
Reply with quote

My requirement is

1)handle the daily changes need to add a where clause to the unload SQL and there the date has to come from a parameter dataset so that every time it runs it can pick all the records Changed after last run.

2) put the logic for updating the parameter file dataset.

i did simple unload like below
Code:
//STEP20  EXEC BMCUNLD,                                       
//             SYSTEM='DSND',                                 
//             UID='XXXXX09##10',                             
//             UTPROC='NEW/RESTART'                           
//SYSTSPRT  DD SYSOUT=*                                       
//SYSPRINT  DD SYSOUT=*                                       
//SYSUDUMP  DD SYSOUT=*                                       
//SYSREC    DD DSN=SFDEV.PRVSN.DATA.LW153.TT,                 
//             DISP=(NEW,CATLG,DELETE),                       
//             RETPD=50,                                     
//             DCB=(DSORG=PS,RECFM=FB,BLKSIZE=0,BUFNO=8),     
//             SPACE=(CYL,(10,2)),                           
//             UNIT=DISK                                     
//SYSCNTL   DD DUMMY                                         
//SYSIN     DD *                                             
UNLOAD                                                       
  DIRECT NO                                                   
        SELECT                                               
                OFFICE_ID                                     
               ,MEMBER_ID                                     
               ,REGION_NO                                     
               ,SECTION_NO                                   
               ,TEAM_NO                                       
               ,TEAM_MEMBER_ID                               
               ,MEMBER_TYPE                                   
               ,VENDOR_CODE                                   
               ,CAT_CODE                                     
               ,DATE_MODIFIED                                 
               ,DELETE_IND                                   
               ,FNAME                                         
               ,LNAME                                         
        INTO                                                 
           OFFICE_ID      CHAR(4)                             
          ,MEMBER_ID      CHAR(6)                             
           ,REGION_NO      CHAR(2)           
           ,SECTION_NO     CHAR(2)           
           ,TEAM_NO        CHAR(2)           
           ,TEAM_MEMBER_ID CHAR(6)           
           ,MEMBER_TYPE    CHAR(1)           
           ,VENDOR_CODE    CHAR(1)           
           ,CAT_CODE       CHAR(2)           
           ,DATE_MODIFIED  CHAR(26)           
           ,DELETE_IND     CHAR(1)           
           ,FNAME          CHAR(30)           
           ,LNAME          CHAR(30)           
          FROM RU99.LW153                     
 /*                                           

but i don't know how to add where clause for daily changes. could you please any one help me to complete this.

Thanks in advance
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Apr 21, 2010 11:32 am
Reply with quote

what does the BMC manual tell about using a where clause for an unload ?

BMC manuals are not available outside a licensed organization , You have them , we do not

why not ask Your peers, or look for a similar process inside Your organization
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top