MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

-IGNORE(WHEN)-

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Fri Mar 11, 2016 12:49 pm    Post subject: -IGNORE(WHEN)- Reply with quote

I can't find an example how to -IGNORE(WHEN)- in my load job. I'm trying to bypass the first record if it's a title line. This is from IBM's site. No example on IBM's site grrr
Code:
-IGNORE(WHEN)-

Specifies that records that do not satisfy the WHEN clause will be ignored. If discarding is specified, records that do not satisfy the when clause will not be loaded, and will not be written to the DISCARD data set. If discarding is not specified, records that do not satisfy the WHEN clause do not cause the LOAD to terminate.
Use the record count messages in the Utility output to determine the number of records ignored.

My load statements

LOAD DATA INDDN(INDD1)                                   
     RESUME YES                                         
     DISCARDDN DISCARD DISCARDS 0                       
     IGNORE(WHEN)    --- I need to bypass if SSNO IS NOT NUMERIC
    FORMAT DELIMITED COLDEL X'05' CHARDEL '"' DECPT  '.'
     INTO TABLE MY.TABLE                         
          (SSNO                INTEGER                , 
           RET_TYPE            CHAR(02)               , 
           )                                             
     LOG NO
 

_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Fri Mar 11, 2016 3:57 pm    Post subject: Reply with quote

NASCAR9,

If you specify the FORMAT DELIMITED option, you cannot use any of the following options:
Code:

    CONTINUEIF
    INCURSOR
    Multiple INTO TABLE statements
    WHEN

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Fri Mar 11, 2016 5:10 pm    Post subject: Reply with quote

That's too bad. Where did you find that information?
I added an OMIT to a sort to remove the record.
Thanks Kolusu.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Fri Mar 11, 2016 5:54 pm    Post subject: Reply with quote

NASCAR9 wrote:
That's too bad. Where did you find that information?
I added an OMIT to a sort to remove the record.
Thanks Kolusu.


Look under the description for DELIMITED in this link

https://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.ugref/src/tpc/db2z_loadsyntax.dita

It is strange that PDF versions of the manuals do not have this IGNORE(WHEN) info in both DB2 10 and 11 Versions.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group