Blank records deletion
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Utilities

#1: Blank records deletion Author: naveen PostPosted: Wed Jan 22, 2003 7:42 am
    —
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

#2:  Author: kolusuLocation: San Jose PostPosted: Wed Jan 22, 2003 7:52 am
    —
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

#3:  Author: coolmanLocation: US PostPosted: Thu Jan 23, 2003 2:37 am
    —
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



MVSFORUMS.com -> Utilities


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group