Where do the Log files get created?

Tools & Utilities
Enthusiast

Where do the Log files get created?

when i write a JCL script for an MLOAD, usually i specify the dBs wheret the error/work tables are to be created. But i dont specify one for the Log table. In that case, where does it get created? As in, what is the default dB and how can that be changed?

The following is a sample script...
//SYSIN DD DATA,DLM=##
.DATEFORM ANSIDATE;
.LOGTABLE ML_TGT_TABLE;
.LOGON TDP1/USER,PWD;
RELEASE MLOAD TEST_DB.TGT_TABLE;
DELETE TEST_DB.TGT_TABLE all;
DROP TABLE TEST_DB.UV_TGT_TABLE;
DROP TABLE TEST_DB.WT_TGT_TABLE;
DROP TABLE TEST_DB.ET_TGT_TABLE;

Here the Error/Work/Target tables get created in TEST_DB whereas i want to know where to find the default dB where the Log table ML_TGT_TABLE will be created.

regards
varun
7 REPLIES
Enthusiast

Re: Where do the Log files get created?

The log table get's created in user's default database. (which in most case is the same as the user id)
Enthusiast

Re: Where do the Log files get created?

Any idea how to find out the default dB for a user?
Enthusiast

Re: Where do the Log files get created?

simple trick is to just login using the id and then do a SELECT DATABASE;

otherwise lookin DBC.Users for defaultdatabasename (if that's null it's the same as user id)
Enthusiast

Re: Where do the Log files get created?

You could try qualifying the logtable...like you have further down?!

//SYSIN DD *
.LOGTABLE DATABASE.MYRUN_LOGTABLE ;
.LOGON TDPP/ ;
etc..etc.

Enthusiast

Re: Where do the Log files get created?

Also check if the user is attached to any profile.
If yes, check if there is a default database mentioned in the profile (DBC.ProfileInfo).

If yes, profile level settings will take precedence over user level settings.

Vinay Bagare
Enthusiast

Re: Where do the Log files get created?

And how does one find out if a user is assigned to any profile or not? and if he is, how to find out to what profile is he assigned to?

regards
varun
Enthusiast

Re: Where do the Log files get created?

Look in DBC.Users (profileName) and DBC.ProfileInfoX