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

OMIT record if there is any blank space


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Jul 21, 2009 2:43 pm
Reply with quote

Hi

I need to OMIT the record if there is any blank space character in the record. The record lenght is 28 and i need to check character by character as i don't have the copybook for the file. can anyone help me with sample JCL.

Thanks,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 21, 2009 4:28 pm
Reply with quote

Search the DFSORT forum for SS.

Not at work at the moment, so no access to my JCL library.
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Jul 21, 2009 4:41 pm
Reply with quote

ok.

I need to check character by character for a Space. even if i get one space that record need to be omitted.

Meanwhile i'll search for SS.

Thanks,
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Jul 21, 2009 4:48 pm
Reply with quote

Is the below syntax correct.

Code:

  OMIT COND = (1,28,SS,EQ,C' ')


One more question, just like
Code:
SUM FIELDS=NONE,XSUM
, how can we copy the OMITTed records into another datasets?
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Jul 21, 2009 5:24 pm
Reply with quote

It worked:

Code:

  OMIT COND=(01,28,SS,EQ,C' ') 
  SORT FIELDS=COPY             


can anyone let me know how to copy those omitted records
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 21, 2009 8:44 pm
Reply with quote

Quote:
can anyone let me know how to copy those omitted records


If you mean how can you omit the records from one file and write them to another, you can use these DFSORT control statements:

Code:

    OPTION
    OUTFIL FNAMES=OUT1,OMIT=(1,28,SS,EQ,C' ')
    OUTFIL FNAMES=OUT2,SAVE


If you mean something else, you need to explain clearly what you mean (an example of input and expected output would help).

Quote:
SUM FIELDS=NONE,XSUM
how can we copy the OMITTed records into another datasets?


You can use the technique shown in the "Keep dropped duplicate records (XSUM)" Smart DFSORT Trick at:

www.ibm.com/support/docview.wss?rs=0&uid=isg3T7000094
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Wed Jul 22, 2009 12:42 pm
Reply with quote

Thank you Frank, i used OUTFIL with OMIT and INCLUDE.
and the link you provided is very helpful. If there are any other links which might be helpful need to be put at the top of each forum. It might help for most of us.

Thank you Frank for your help.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jul 22, 2009 8:57 pm
Reply with quote

Quote:
If there are any other links which might be helpful need to be put at the top of each forum. It might help for most of us.


There are several such "sticky" links at the top of this Forum such as:

ibmmainframes.com/viewtopic.php?t=1348
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Mon Aug 10, 2009 6:24 pm
Reply with quote

Hi Frank,

how to check the character for non-numeric (also includes a blank space). is the below code correct:

Code:

  OMIT=(06,11,SS,EQ,NUM)
Back to top
View user's profile Send private message
sid_aec

New User


Joined: 01 Jul 2008
Posts: 60
Location: Kolkata

PostPosted: Mon Aug 10, 2009 9:03 pm
Reply with quote

Code:

   OMIT COND=(06,11,FS,NE,NUM)


If you want the records to be omitted if there is any non-numeric value present..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Aug 10, 2009 10:04 pm
Reply with quote

Arvind,

If you want to create one output file that has records with numerics (0-9) in positions 6-16, and another output file that has records with non-numerics in positions 6-16, you can use these DFSORT control statements:

Code:

  OPTION COPY                                   
  OUTFIL FNAMES=NUM,INCLUDE=(6,11,FS,EQ,NUM)   
  OUTFIL FNAMES=NONNUM,SAVE                     


If you want to do something else, explain in more detail what you want to do.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top