View previous topic :: View next topic
|
Author |
Message |
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
Hi,
I have a file of lenght 133 and records in that file.
Also in between i have blank records.
Iam truing to use the omit cond to remove the blank recprds
Code: |
SORT FIELDS=COPY
OMIT COND=(1,133,CH,EQ,C' ')
|
but this is not working ..iam still getting the blank lines
Is there any thing wrong with the sort card. Pls help.. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
are you sure that col 133 has blanks ?
Your code should work.
Gerry |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
also testing col 133 for blanks does not mean the entire record is blank.
Gerry |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And would this naughty little file be a VB file or a FB file ? |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
Its a FB..file
Yes it a blank line..
Otherwise how to check if there is any hidden data in that records as this particular file has been ftp'ed as a notepad to a mainframe file.
Thanks, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
HEX ON |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
can you try hex on and see if all byes have an x'40'.
Gerry |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Paste your sample input file too |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
000078
044444444444444444444444444444444444444444444444444444444444444444444444
C00000000000000000000000000000000000000000000000000000000000000000000000
above pasted line is the blank record..when iam doing an hex on. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
That is your problem |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
If you don't want to omit such lines, try this.
Code: |
SORT FIELDS=COPY
OMIT COND=(1,133,CH,EQ,C' ')
|
|
|
Back to top |
|
|
Selva-kumar
New User
Joined: 01 Mar 2007 Posts: 52 Location: chennai
|
|
|
|
Hi Swapnam,
It seems that the record is not completely blank. At the first byte there is a X'0C' character. It is the hex value of Positive sign. |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
I want to omit all such lines
pls let me know if the below code is correct
SORT FIELDS=COPY
OMIT COND=(1,1,CH,NE,C' ')
mu file would look like this
17 XYZ 123
XYZ1
XYZ2
18 ABC 345
ABC1
ABC2
19 CDE 123
CDE1
CDE2
the blank line b/w 18 and 19th record has to be deleted.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Arun
He wants to get rid of the pseudo blank lines
selva-kumar
I think that you are pretty well mistaken in your statement that '0C'X equates to charachter +
Try it and see.
swapnam
Why don't you just try it and see what happens. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Arun,
how does your code differ from original code ?
Gerry |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
Yes..i have tried it..its working
just trying to see all the records if its perfect or something wrong is happening... |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
system going down ..i will check and let you know..
Thanks everybody for your help |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
gcicchet wrote: |
how does your code differ from original code ? |
Hi Gerry,
Did not notice the original code. Time to change the power of my glasses
Expat,
If that is the case, he'll have to identify all the 'pseudo-blank' bytes. |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
only the first byte has some value rest of the 132 chars are blank..
so probably i can check on this condition also
all my other detail records doesnt have any charter and they are blank..so to differentiate the code that i have written..works i hope.
sorry i dint understand..what are psuedo-blank bytes...
Thanks.. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
also I think the first 4 bytes is a COMP field
Code: |
007044444444444444444444444444444444444444444444444444444444444444444444
008C00000000000000000000000000000000000000000000000000000000000000000000
|
Gerry |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
No..please ignore the first line..its the line number that shows in the file
only the last 2 lines represent blank like..hope iam correct
so its
Code: |
0444444444444444444444444...
C000000000000000000000000...
|
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
what are psuedo-blank bytes |
What I meant is those bytes which 'look' blank, but has some data in non-displayable format or NE X'40' . I m not sure whether you want to omit these records also. |
|
Back to top |
|
|
swapnam
New User
Joined: 30 Sep 2008 Posts: 17 Location: City
|
|
|
|
Hi Arun,
Yes..i just want to omit all records which look blanks/which are blank.
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
i just want to omit all records which look blanks |
Then you must define them. . . There is no syntax for "looks like blank". There are other values that "don't quite look like blank" but are not a usable letter/number/special character that you need to consider.
You can either specify which value(s) to include or which to exclude.
"Real" blanks are easy - they are x'40'. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
swapnam,
If you want to omit records that have X'0C' in position 1 and blanks in positions 2-133, you can use this OMIT statement:
Code: |
OMIT COND=(1,1,BI,EQ,X'0C',AND,2,132,CH,EQ,C' ')
|
If that's not what you want to do, then you need to give a better explanation of what you want to do. |
|
Back to top |
|
|
|