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

JCL - Omit blank records in a file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 11:21 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 16, 2008 11:26 am
Reply with quote

Hi,

are you sure that col 133 has blanks ?


Your code should work.

Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 16, 2008 11:28 am
Reply with quote

Hi,

also testing col 133 for blanks does not mean the entire record is blank.

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

Global Moderator


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

PostPosted: Thu Oct 16, 2008 11:31 am
Reply with quote

And would this naughty little file be a VB file or a FB file ?
Back to top
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 11:35 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Oct 16, 2008 11:37 am
Reply with quote

HEX ON
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 16, 2008 11:37 am
Reply with quote

Hi,

can you try hex on and see if all byes have an x'40'.


Gerry
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Oct 16, 2008 11:38 am
Reply with quote

Paste your sample input file too
Back to top
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 11:43 am
Reply with quote

000078
044444444444444444444444444444444444444444444444444444444444444444444444
C00000000000000000000000000000000000000000000000000000000000000000000000

above pasted line is the blank record..when iam doing an hex on.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Oct 16, 2008 11:44 am
Reply with quote

That is your problem
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Oct 16, 2008 11:48 am
Reply with quote

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
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Thu Oct 16, 2008 11:50 am
Reply with quote

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
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 11:53 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Oct 16, 2008 11:53 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 16, 2008 11:54 am
Reply with quote

Hi Arun,

how does your code differ from original code ?


Gerry
Back to top
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 11:56 am
Reply with quote

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
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 11:59 am
Reply with quote

system going down ..i will check and let you know..

Thanks everybody for your help
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Oct 16, 2008 12:03 pm
Reply with quote

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 36_2_51.gif

Expat,

If that is the case, he'll have to identify all the 'pseudo-blank' bytes.
Back to top
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 12:11 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 16, 2008 12:11 pm
Reply with quote

Hi,

also I think the first 4 bytes is a COMP field
Code:
007044444444444444444444444444444444444444444444444444444444444444444444
008C00000000000000000000000000000000000000000000000000000000000000000000



Gerry
Back to top
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 12:13 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Oct 16, 2008 2:02 pm
Reply with quote

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
View user's profile Send private message
swapnam

New User


Joined: 30 Sep 2008
Posts: 17
Location: City

PostPosted: Thu Oct 16, 2008 2:17 pm
Reply with quote

Hi Arun,

Yes..i just want to omit all records which look blanks/which are blank.


Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 16, 2008 7:29 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Oct 16, 2008 11:05 pm
Reply with quote

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
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 -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top