Page 1 of 1

Query for an utility to copy records on condition

Posted: Tue Mar 30, 2010 12:58 am
by nagesh divvela

I have a dataset which would be having the dataset name with date qualifier like beow, where the last qualifier is the date(MMDDYY) :


I wanted to copy all the file name that have been created before particular date which will be read from another file to purge them through IDCAMS step.

The other data set would be having the date like below :


So the new dataset which has to be created for purging by IDCAMS should be like :


So, can some one help me in meeting this requirement.
I hope the requirement is clear for all, if you can suggest me any other way of purging the datasets in the file is even fine.

Nagesh D.

Posted: Tue Mar 30, 2010 4:15 am
by Frank Yaeger
Is 250310 a ddmmyy date? What is the RECFM and LRECL of that file?

What is the RECFM and LRECL of the file with the dataset names? Does the mmddyy date in this file always start in position 20, or can it start in other positions. If the mmddyy date can start in different positions in different records, then what are the "rules" for finding the starting position of the date?

Posted: Tue Mar 30, 2010 5:05 pm
by nagesh divvela
Hi Frank,

Thanks for the reply and the query.
Both the data sets are of LRECL 80 only, the data mmddyy would be starting from position 1 itself in the other dataset.

So it will be like, one dataset will be having the date value in the first six chars and the other would be having the data set names starting from position 1 itself. All the dataset names will be of the same length differing only by the last date qualifier.

Let me know in case of any queries

Nagesh D

Posted: Tue Mar 30, 2010 9:11 pm
by skolusu
nagesh divvela,

First of all you canNOT have a DSN name with numeric as the first qualifier. so your dataset names are not even valid


Look up ADRDSSU which lets you delete the datasets with wild cards and creation dates