View previous topic :: View next topic
|
Author |
Message |
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Search the DFSORT forum for SS.
Not at work at the moment, so no access to my JCL library. |
|
Back to top |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
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 |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
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 |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
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 |
|
|
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|