Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL - Omit blank records in a file
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL - Omit blank records in a file
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: 1703
Location: Australia

PostPosted: Thu Oct 16, 2008 11:26 am    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Oct 16, 2008 11:28 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 16, 2008 11:31 am    Post subject:
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    Post subject: Reply to: JCL - Omit blank records in a file
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: 8593
Location: Back in jolly old England

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

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

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 16, 2008 11:37 am    Post subject:
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    Post subject:
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    Post subject: Reply to: JCL - Omit blank records in a file
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: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 16, 2008 11:44 am    Post subject:
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: 2158
Location: @my desk

PostPosted: Thu Oct 16, 2008 11:48 am    Post subject:
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    Post subject: Reply to: JCL - Omit blank records in a file
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    Post subject: Reply to: JCL - Omit blank records in a file
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: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 16, 2008 11:53 am    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Oct 16, 2008 11:54 am    Post subject:
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    Post subject: Reply to: JCL - Omit blank records in a file
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    Post subject:
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: 2158
Location: @my desk

PostPosted: Thu Oct 16, 2008 12:03 pm    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Oct 16, 2008 12:11 pm    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us