Repository Deciphering

There’s a field called ds_pending_job.day_timing in the repository that is some calculation to determine the time schedule a document is to be refreshed on. Has anyone been able to make heads or tails out of this field? I tried reading the Repository documentation with no insight to be found. Thanks for any information.


djschmitt (BOB member since 2002-08-30)

The documentation of that field says:

What? That’s not clear? :confused: :rotf: :confused: :roll_eyes:

I’m not sure about this, but I believe that this is where the User Defined intervals are stored. I’ll do some more checking and see what I can find.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

I did a search here on BOB for day_timing and came up with this topic. It should everything you need.

For future reference, if you try the Search page first, you might get the answer you need much faster. :wink:


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

I have read the documentation on Integra’s website, and can’t make heads or tails out of it. I read the link to the previous post, and according to that, my number should be 123450.

My report is scheduled to refresh daily - Monday through Friday every 1 week - with a file watcher, save as text and to send to user in overwrite mode. The number I see in that field is 2097401.

Perhaps this field just isn’t meant to be interpreted.


djschmitt (BOB member since 2002-08-30)

Just curious… if you are using a FILEWATCHER, then why does the timing matter? It’s just a job that runs every XX minutes until the File you are watching for appears. As long as your job is set to delete the FILE it watched for, then you don’t have to worry about this task starting multiple times.

Just a thought… if you still need help on the timing, then I’ll bring out the 5.x repository information and help you create a value to accomplishes what you need it to.

-RM


digpen :us: (BOB member since 2002-08-15)

That’s just the job I have in front of me now, and I didn’t know if File Watcher changed the number by a few bytes or anything.

Ideally, if I knew how to break the numbers down into what they meant in English, then I could run a report that will tell me all the jobs that are scheduled and when.

Since I can’t see everything scheduled, I wanted to query the repository to see what I have scheduled - as well as other divisions on the same BCA - and when so I can schedule something new at a time that’s not being over-used.

Thanks again for any help. :yesnod:


djschmitt (BOB member since 2002-08-30)

You might check out this universe, available at the Integra Solutions web site based on the repository database. It might already have everything you need.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

That’s the universe I’m currently using, and unfortunately, it doesn’t contain the information that I’m looking for.

It contains the Frequency - Daily, Weekly, Monthly, etc - but doesn’t let me know if the reports are Weekly on Monday and Wednesday or Daily at 11:30pm.


djschmitt (BOB member since 2002-08-30)

I’ve created some SQL that will generate a view, giving a more VERBOSE description of the values in the DAY_TIMING field. You will still have to check the BEGIN_DATE and TIME (or add that SQL to this view), but this is mainly to translate the DAY_TIMING field into English.

Warning… Nasty code ahead:


create or replace view DAY_TIMING_VW as 
select BATCH_ID,DAY_TIMING,frequency,
(CASE
	WHEN FREQUENCY in (64,66) then 
		'MONTHLY on ' ||
		rtrim(
		decode(bitand(DAY_TIMING,power(2,31)),power(2,31),'1,',null) || 
		decode(bitand(DAY_TIMING,power(2,30)),power(2,30),'2,',null) || 
		decode(bitand(DAY_TIMING,power(2,29)),power(2,29),'3,',null) || 
		decode(bitand(DAY_TIMING,power(2,28)),power(2,28),'4,',null) || 
		decode(bitand(DAY_TIMING,power(2,27)),power(2,27),'5,',null) || 
		decode(bitand(DAY_TIMING,power(2,26)),power(2,26),'6,',null) || 
		decode(bitand(DAY_TIMING,power(2,25)),power(2,25),'7,',null) || 
		decode(bitand(DAY_TIMING,power(2,24)),power(2,24),'8,',null) || 
		decode(bitand(DAY_TIMING,power(2,23)),power(2,23),'9,',null) || 
		decode(bitand(DAY_TIMING,power(2,22)),power(2,22),'10,',null) || 
		decode(bitand(DAY_TIMING,power(2,21)),power(2,21),'11,',null) || 
		decode(bitand(DAY_TIMING,power(2,20)),power(2,20),'12,',null) || 
		decode(bitand(DAY_TIMING,power(2,19)),power(2,19),'13,',null) || 
		decode(bitand(DAY_TIMING,power(2,18)),power(2,18),'14,',null) || 
		decode(bitand(DAY_TIMING,power(2,17)),power(2,17),'15,',null) || 
		decode(bitand(DAY_TIMING,power(2,16)),power(2,16),'16,',null) || 
		decode(bitand(DAY_TIMING,power(2,15)),power(2,15),'17,',null) || 
		decode(bitand(DAY_TIMING,power(2,14)),power(2,14),'18,',null) || 
		decode(bitand(DAY_TIMING,power(2,13)),power(2,13),'19,',null) || 
		decode(bitand(DAY_TIMING,power(2,12)),power(2,12),'20,',null) || 
		decode(bitand(DAY_TIMING,power(2,11)),power(2,11),'21,',null) || 
		decode(bitand(DAY_TIMING,power(2,10)),power(2,10),'22,',null) || 
		decode(bitand(DAY_TIMING,power(2,9)),power(2,9),'23,',null) || 
		decode(bitand(DAY_TIMING,power(2,8)),power(2,8),'24,',null) || 
		decode(bitand(DAY_TIMING,power(2,7)),power(2,7),'25,',null) || 
		decode(bitand(DAY_TIMING,power(2,6)),power(2,6),'26,',null) || 
		decode(bitand(DAY_TIMING,power(2,5)),power(2,5),'27,',null) || 
		decode(bitand(DAY_TIMING,power(2,4)),power(2,4),'28,',null) || 
		decode(bitand(DAY_TIMING,power(2,3)),power(2,3),'29,',null) || 
		decode(bitand(DAY_TIMING,power(2,2)),power(2,2),'30,',null) || 
		decode(bitand(DAY_TIMING,power(2,1)),power(2,1),'31,',null) || 
		decode(bitand(DAY_TIMING,power(2,0)),power(2,0),'LAST,',null) ,',') 
	WHEN FREQUENCY in (8,10) then 'HOURLY' ||
		(CASE WHEN DAY_TIMING <24 then ' at ' || DAY_TIMING 
			  WHEN instr(DAY_TIMING,'0',1,3) > 0 then
			  ' between ' || substr(DAY_TIMING,1,instr(DAY_TIMING,'0',1,2)-1) || ' and ' || substr(DAY_TIMING,instr(DAY_TIMING,'0',1,2)+1)
			  WHEN instr(DAY_TIMING,'0',1,2) = length(DAY_TIMING) then 	
			  ' between ' || substr(DAY_TIMING,1,instr(DAY_TIMING,'0',1,1)-1) || ' and ' || substr(DAY_TIMING,instr(DAY_TIMING,'0',1,1)+1)
			  WHEN instr(DAY_TIMING,'0',1,2) > 0 then 	
			  ' between ' || substr(DAY_TIMING,1,instr(DAY_TIMING,'0',1,2)-1) || ' and ' || substr(DAY_TIMING,instr(DAY_TIMING,'0',1,2)+1)
			  ELSE
			  ' between ' || substr(DAY_TIMING,1,instr(DAY_TIMING,'0',1)-1) || ' and ' || substr(DAY_TIMING,instr(DAY_TIMING,'0',1)+1)			  
		END)
	WHEN FREQUENCY in (16,18) then 'DAILY every ' ||
		( decode(bitand(DAY_TIMING,power(2,21)),power(2,21),1,0) +
		  decode(bitand(DAY_TIMING,power(2,22)),power(2,22),2,0) +
		  decode(bitand(DAY_TIMING,power(2,23)),power(2,23),4,0) +
		  decode(bitand(DAY_TIMING,power(2,24)),power(2,24),8,0) +
		  decode(bitand(DAY_TIMING,power(2,25)),power(2,25),16,0) +
		  decode(bitand(DAY_TIMING,power(2,26)),power(2,26),32,0) +
		  decode(bitand(DAY_TIMING,power(2,27)),power(2,27),64,0)) || ' week(s) on ' || 
		rtrim(
			decode(bitand(DAY_TIMING,power(2,3)),power(2,3),'MON,',null) || 
			decode(bitand(DAY_TIMING,power(2,4)),power(2,4),'TUE,',null) || 
			decode(bitand(DAY_TIMING,power(2,5)),power(2,5),'WED,',null) || 
			decode(bitand(DAY_TIMING,power(2,6)),power(2,6),'THU,',null) || 
			decode(bitand(DAY_TIMING,power(2,7)),power(2,7),'FRI,',null) || 
			decode(bitand(DAY_TIMING,power(2,8)),power(2,8),'SAT,',null) || 
			decode(bitand(DAY_TIMING,power(2,9)),power(2,9),'SUN,',null)
		,',')
	WHEN FREQUENCY in (32,34) then 'WEEKLY every ' ||
		( decode(bitand(DAY_TIMING,power(2,21)),power(2,21),1,0) +
		  decode(bitand(DAY_TIMING,power(2,22)),power(2,22),2,0) +
		  decode(bitand(DAY_TIMING,power(2,23)),power(2,23),4,0) +
		  decode(bitand(DAY_TIMING,power(2,24)),power(2,24),8,0) +
		  decode(bitand(DAY_TIMING,power(2,25)),power(2,25),16,0) +
		  decode(bitand(DAY_TIMING,power(2,26)),power(2,26),32,0) +
		  decode(bitand(DAY_TIMING,power(2,27)),power(2,27),64,0)) || ' week(s) on ' || 
		rtrim(
			decode(bitand(DAY_TIMING,power(2,3)),power(2,3),'MON,',null) || 
			decode(bitand(DAY_TIMING,power(2,4)),power(2,4),'TUE,',null) || 
			decode(bitand(DAY_TIMING,power(2,5)),power(2,5),'WED,',null) || 
			decode(bitand(DAY_TIMING,power(2,6)),power(2,6),'THU,',null) || 
			decode(bitand(DAY_TIMING,power(2,7)),power(2,7),'FRI,',null) || 
			decode(bitand(DAY_TIMING,power(2,8)),power(2,8),'SAT,',null) || 
			decode(bitand(DAY_TIMING,power(2,9)),power(2,9),'SUN,',null)
		,',')
	WHEN FREQUENCY in (128,130) then 'MONTHLY INTERVAL every ' ||
		( decode(bitand(DAY_TIMING,power(2,21)),power(2,21),1,0) +
		  decode(bitand(DAY_TIMING,power(2,22)),power(2,22),2,0) +
		  decode(bitand(DAY_TIMING,power(2,23)),power(2,23),4,0) +
		  decode(bitand(DAY_TIMING,power(2,24)),power(2,24),8,0) +
		  decode(bitand(DAY_TIMING,power(2,25)),power(2,25),16,0) +
		  decode(bitand(DAY_TIMING,power(2,26)),power(2,26),32,0) +
		  decode(bitand(DAY_TIMING,power(2,27)),power(2,27),64,0)) || ' ' ||
		rtrim(
			decode(bitand(DAY_TIMING,power(2,13)),power(2,13),'1st,',null) || 
			decode(bitand(DAY_TIMING,power(2,14)),power(2,14),'2nd,',null) || 
			decode(bitand(DAY_TIMING,power(2,15)),power(2,15),'3rd,',null) || 
			decode(bitand(DAY_TIMING,power(2,16)),power(2,16),'4th,',null) || 
			decode(bitand(DAY_TIMING,power(2,17)),power(2,17),'Last,',null)
		,',') || ' ' ||
		rtrim(
			decode(bitand(DAY_TIMING,power(2,3)),power(2,3),'MON,',null) || 
			decode(bitand(DAY_TIMING,power(2,4)),power(2,4),'TUE,',null) || 
			decode(bitand(DAY_TIMING,power(2,5)),power(2,5),'WED,',null) || 
			decode(bitand(DAY_TIMING,power(2,6)),power(2,6),'THU,',null) || 
			decode(bitand(DAY_TIMING,power(2,7)),power(2,7),'FRI,',null) || 
			decode(bitand(DAY_TIMING,power(2,8)),power(2,8),'SAT,',null) || 
			decode(bitand(DAY_TIMING,power(2,9)),power(2,9),'SUN,',null) ||
			decode(bitand(DAY_TIMING,power(2,10)),power(2,10),'WEEKDAY,',null) ||
			decode(bitand(DAY_TIMING,power(2,11)),power(2,11),'DAY,',null) ||
			decode(bitand(DAY_TIMING,power(2,12)),power(2,12),'BUSINESS DAY,',null)
		,',')		
	END) as TIMING_DESC
from DS_PENDING_JOB;

digpen :us: (BOB member since 2002-08-15)

:blue: Holy cow. That’s some code. :shock: Thanks, digpen, I’ll take that and look at it a bit for understanding, try it out, and post the results.


djschmitt (BOB member since 2002-08-30)

Good deal, let me know if it works for you. I used example data from the Repository HTML, but some of the information contained therein is wrong.

-RM


digpen :us: (BOB member since 2002-08-15)

I tried it yesterday but I got ‘missing right parenthesis’ :confused:


Cindy Clayton :us: (BOB member since 2002-06-11)

Come on! Are you sure you counted all of the parens? :smiley: When I copy and paste this text, my editor shows that it’s still balanced (each open paren has the appropriate close paren).

If you copy/paste it again and still have issues, I’ll load up the other computer and edit my code and post it again. I also have the code as a zipped file, so I can have it loaded here with a link for download if the copy/paste method is causing issues.

-RM


digpen :us: (BOB member since 2002-08-15)

For reference and historical purposes, I’m posting to add a tip 8) :

Later versions of BO 5.1.x (like BO 5.1.5, 5.1.6 – not sure about 5.1.4) removed much information on the DS_PENDING_JOB.DAY_TIMING field from the “Freeware” folder on the CD.

If you have a copy of BO 5.1.3, or can download it from BO’s ESD site, there is a really comprehensive section on DAY_TIMING that explains it in great detail.

The path and file on the CD is:

\Vol1\Freeware\repostry\rpdspj.htm

I would love to post the file here as an attachment, but am concerned about copyright infringement.

Regards,

Dan Lelovic


dl_toronto :canada: (BOB member since 2002-08-28)