Omit Datasets with Dates



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Omit Datasets with Dates

Postby joelquit » Fri Sep 20, 2019 8:15 am

Hi,

I have a file containing a list of datasets. I need to omit datasets having dates. The dates can have different formats and positions (sample below). Is there a way to omit them via sort or any other utility?

PROCESS.PRD.LOADLIB.D170830
CEY.PFX.JCLLIB.BKUP.D290419
CNX.SFX.V35ANAB.MACLIB.D2015124

Thanks in advance
joelquit
 
Posts: 2
Joined: Wed Aug 28, 2019 6:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: Omit Datasets with Dates

 

Re: Omit Datasets with Dates

Postby NicC » Fri Sep 20, 2019 2:38 pm

Yes. But you would probably have to hand code each different date.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3004
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Omit Datasets with Dates

Postby enrico-sorichetti » Fri Sep 20, 2019 3:39 pm

The dates can have different formats and positions


assuming that a <date> qualifier is in the format zNNNNNNN

a rexx script along the lines of


/* rexx */

Trace "O"

list.1 = "PROCESS.PRD.LOADLIB.D170830"
list.2 = "CEY.PFX.D290419.JCLLIB.BKUP"
list.3 = "CNX.SFX.V35ANAB.MACLIB"
list.4 = "CNX.D2015124.SFX.V35ANAB.MACLIB"
list.5 = "CEY.PFX.JCLLIB.BKUP.NODATE"
list.6 = "CNX.SFX.V35ANAB.MACLIB.D2015124"


list.0 = 6

do  i = 1 to list.0

    temp = list.i
    has_date = 0
    do while ( temp \= "" )
        parse var temp qual "." temp
        if verify( substr(qual,2) ,"1234567890" ) = 0 then do
            has_date = 1
            leave
        end
    end
    if  has_date = 1 then ,
        iterate
    say "kept " i list.i
end

 

will do it


kept  3 CNX.SFX.V35ANAB.MACLIB
kept  5 CEY.PFX.JCLLIB.BKUP.NODATE
 
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2927
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 154 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post