Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
OMIT record if there is any blank space

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: OMIT record if there is any blank space
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 21, 2009 4:28 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Jul 21, 2009 8:44 pm    Post subject:
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:

http://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    Post subject:
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 Moderator


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

PostPosted: Wed Jul 22, 2009 8:57 pm    Post subject:
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:

http://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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Mon Aug 10, 2009 10:04 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts The TS7720 is out of cache space. Rex Montemayor All Other Mainframe Topics 2 Mon Sep 25, 2017 7:18 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us