MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Blank records deletion

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
naveen
Beginner


Joined: 03 Dec 2002
Posts: 90
Topics: 31

PostPosted: Wed Jan 22, 2003 7:42 am    Post subject: Blank records deletion Reply with quote

How to delete all blank records in a file?

If input is (rec. length = 80)

Code:
aaaaaaaaf fgagdgfdgd
fsfsfs
fsfsfsfsfs

fsfasfsfsa

fsfsfsf


then output should be:
Code:
aaaaaaaaf fgagdgfdgd
fsfsfs
fsfsfsfsfs
fsfasfsfsa
fsfsfsf
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Wed Jan 22, 2003 7:52 am    Post subject: Reply with quote

Naveen,

You can use OMIT condition to get rid of the unwanted records.If the input you have shown are indeed blank lines(all spaces), then the following jcl will give you the results.

Code:

//STEP0100 EXEC  PGM=SORT                                     
//*
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD *
aaaaaaaaf fgagdgfdgd
fsfsfs
fsfsfsfsfs

fsfasfsfsa

fsfsfsf                                               
//SORTOUT  DD DSN=YOUR OUTPUT FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN     DD *         
  SORT FIELDS=COPY
  OMIT COND=(1,80,CH,EQ,C' ')
/*



Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Thu Jan 23, 2003 2:37 am    Post subject: Reply with quote

Hi,
You can also use this method, if you file is not very huge.

/* Rexx */
Address Isredit
"MACRO PROCESS"
"X ALL 1 ' ' "
"DEL ALL X"
"SAVE"

coolman
________
dispensaries
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group