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 

Omitting records with null value in field

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
geraldegivens
Beginner


Joined: 25 Apr 2018
Posts: 1
Topics: 1

PostPosted: Wed Apr 25, 2018 2:23 pm    Post subject: Omitting records with null value in field Reply with quote

i need to omit records with null value in a field. currently the only syntax in sort is sort=copy.
the file is ftp's up to the mainframe, the only description i have of the file is in the step after the sort that loads it to the table. this is the load card:
Code:
LOAD,DATA LOG NO INDDN SYSREC00 REPLACE
   COPYDDN(IMAGESET)
   STATISTICS TABLE(ALL) INDEX(ALL)
   SORTKEYS
INTO TABLE  CACRADB.TDUNS_CSAD_SHORT
 (
 CSAD_LOC_NO                            POSITION(       1         )
 INTEGER EXTERNAL(9)           ,
 CSAD_CRED_SCR_PCTL                     POSITION(       10        )
 INTEGER EXTERNAL(3) NULLIF(10:10)=' ',
 CSAD_TOT_SUITS                         POSITION(      13         )
 INTEGER EXTERNAL(5)  NULLIF (13:13)= ' ',
 CSAD_TOT_JUDGMNTS                      POSITION(      18         )
 INTEGER EXTERNAL(5)  NULLIF (18:18)= ' ',
 CSAD_PAYEXP_NUMBER                     POSITION(      23         )
 INTEGER EXTERNAL(5)  NULLIF (23:23)= ' ',
 CSAD_PAYEXP_SLOW                       POSITION(      28         )
 INTEGER EXTERNAL(5)  NULLIF (28:28)= ' ',
 CSAD_PAYEXP_NEGATV                     POSITION(      33         )
 INTEGER EXTERNAL(5)  NULLIF (33:33)= ' ',
 CSAD_PAYEXP_SATISF                     POSITION(      38         )
 INTEGER EXTERNAL(5)  NULLIF (38:38)= ' ',
 CSAD_PAYEXP_PAST90                     POSITION(      43         )
 INTEGER EXTERNAL(5)  NULLIF (43:43)= ' ',
 CSAD_RESIDENCE_OPR                     POSITION(      48         )
 CHAR(                      1)
 )
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 25, 2018 2:36 pm    Post subject: Reply with quote

geraldegivens,

Do you need to eliminate if there is NULL on the fields or any field? the following fields are NULL
Code:

CSAD_CRED_SCR_PCTL     
CSAD_TOT_SUITS         
CSAD_TOT_JUDGMNTS     
CSAD_PAYEXP_NUMBER     
CSAD_PAYEXP_SLOW       
CSAD_PAYEXP_NEGATV     
CSAD_PAYEXP_SATISF     
CSAD_PAYEXP_PAST90     

Is it an AND condition i.e we would eliminate the record ONLY if ALL the above fields are null. something like this
Code:

//SYSIN    DD *                     
  OPTION COPY                       
  OMIT COND=(10,03,CH,EQ,C' ',AND,   
             13,01,CH,EQ,C' ',AND,   
             18,01,CH,EQ,C' ',AND,   
             23,01,CH,EQ,C' ',AND,   
             28,01,CH,EQ,C' ',AND,   
             33,01,CH,EQ,C' ',AND,   
             38,01,CH,EQ,C' ',AND,   
             43,01,CH,EQ,C' ')       
//*



If it is an OR condition then would eliminate the record if any of One of the field is NULL
something like this
Code:

//SYSIN    DD *                           
  OPTION COPY                             
  OMIT COND=(10,03,CH,EQ,C' ',OR,         
             13,01,CH,EQ,C' ',OR,         
             18,01,CH,EQ,C' ',OR,         
             23,01,CH,EQ,C' ',OR,         
             28,01,CH,EQ,C' ',OR,         
             33,01,CH,EQ,C' ',OR,         
             38,01,CH,EQ,C' ',OR,         
             43,01,CH,EQ,C' ')             
//*                                       

_________________
Kolusu
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 -> Utilities 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