Why does my C compile fail if I remove data sets I do not use?

I was playing with caching of header file PDSEs when I compiled a C program. I could see from the SMF 42.6 records that CEE.SCEEH.H PDS was being used.  It took nearly two hours before my job did not use this PDS!
I created a PDSE called COLIN.SCEEH.H and copied CEE.SCEEH.H into it.  I updated my JCL to use the new libraries,  reran my job and the SMF records show I was till using CEE.SCEEH.H.  Hmm this was very strange.

I renamed CEE.SCEEH.H to COLIN.CEE.SCEEH.H.  Did it work ?   No – I got compile errors, so I renamed it back again.  Removing the data set clearly does not work.

I then spotted in the compiler listing that I had the default SEARCH(//’CEE.SCEEH.+’).   I added SE(//’COLIN.SCEEH.+’)  and thought Fixed it!  No … still not fixed,  it still used CEE.SCEEH…

I had to use C options NOSEARCH, SE(//’COLIN.SCEEH.+’) .  The first option turns off the SEARCH(//’CEE.SCEEH.+’) , and the second one creates a new one.   After a cup of tea and a biscuit I remembered I had hit this about 20 years ago!

One thought on “Why does my C compile fail if I remove data sets I do not use?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s