Schedule File Break Re-ordering to permit Bookends and Billboards
Oleg, I am wondering if there is some way Robotask can help us accomplish this?
We need to overcome a limitation of our current Traffic and Billing system by performing an additional operation on these text schedule files (which are based on the CCMS Digital Ad Insertion Schedule File specification.) The problem occurs only on our News channels when trying to schedule in the same commercial break a “bookend” commercial (two related :15 second spots at either end of a commercial break) and :10 second News Sponsorship Billboards.
By definition, our News Billboards are sold to be the first item in a commercial break following the sponsored News Segment or the last item in a commercial break immediately before the sponsored News Segment. The definition of a Bookend spot is generally that it contains two related 15 second segments that are to run in a single commercial break but must be separated by other commercial(s). A normal practice for a T&B system would be to place these :15 segments at the beginning and end of a commercial break, allowing other commercial items to place in between them. This is what our Traffic system does.
However, in the case where News Sponsorship Billboards have also been sold in a break, those billboards should remain on the outside edges of the commercial break (first break position and last break position) to place them in the closest possible proximity to the sponsored news segment. So the Billboards should take priority over the bookends and remain at the outside edges of the break. Because our T&B system sees a bookend as a single 30 second spot, and does not split it into two separate 15s until it generates the schedule file, it is impossible for our Traffic Department to “fix” the order in which the system places break items in a commercial break when a Bookend and one or more Billboards occur in the same break.
While there is no way to accomplish this within our current Traffic & Billing system, an automated “re-ordering” operation where required on specific breaks within the News Channel text schedule files after they are produced could accomplish the goal, solve the problem and not interfere with the verification process as the insertion verification text files (created by the insertion system from running the schedule files) are loaded back in to the Traffic and Billing system.
What the Traffic System will do in a break with a bookend and two billboards:
:15 Tom’s Muffler A (Bookend part 1)
:10 News Billboard A
:30 Bob’s Bar-B-Q
:10 News Billboard B
:15 Tom’s Muffler B (Bookend part 2)
What we need it to look like:
:10 News Billboard A
:15 Tom’s Muffler A (Bookend part 1)
:30 Bob’s Bar-B-Q
:15 Tom’s Muffler B (Bookend part 2)
:10 News Billboard B
As one can see, each “spot” or break item is represented on a different line in the text file. Although this is simply a representation and does not resemble the actual text file, each break is easily identifiable and each item within the break is on a separate line and the lengths of each item in a break is also easily identifiable.
While there are variations and nuances for which we must account, the overall logic of the “re-ordering” needed should be clear from this illustration.
Here is an example of the contents of a schedule file:
REM Xc 0 Schedule lines changed 5/22/2013 3:45:25 PM for schedule \\tamp20pvfiler01.corp.local\BHMS Schedules\Schedules\VW-IN\TB\SD\52368020.SCH
REM Eclipse Sky Connect Schedule for SPIN-BN9 on 05/23/2013
LOI 0523 001100 0007 0009 001 001 000010 000000 00000000 000 00020112511 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 2 RE Sch.
LOI 0523 001110 0007 0009 001 002 000030 000000 00000000 000 00020108203 0000 000102540 Bay News 9 Marketin BN9IM130305_BN9 Sch.
LOI 0523 001140 0007 0009 001 003 000030 000000 00000000 000 00020109510 0000 000144951 BH Marketing -TPA BHNB120412ERH REV 03 Sch.
LOI 0523 001210 0007 0009 001 004 000030 000000 00000000 000 00020104697 0000 TPA TBFIL Tampa INTC & Defaul BuzzedDrivingPrev_Mo Fill
LOI 0523 001240 0007 0009 001 005 000030 000000 00000000 000 00020113302 0000 TPA LCPSA Tampa Local Filler Career Day Veterans Fill
LOI 0523 002200 0019 0008 001 001 000010 000000 00000000 000 00020108796 0000 000109587 Brandon Ford HILLS1303204B_MARINE Sch.
LOI 0523 002210 0019 0008 001 002 000030 000000 00000000 000 00020110327 0000 000102540 Bay News 9 Marketin BN9IM130401_BN9 Brea Sch.
LOI 0523 002240 0019 0008 001 003 000030 000000 00000000 000 00020086664 0000 000138461 The Ticktin Law Gro 727 PETER 2012 REVIS Sch.
LOI 0523 002310 0019 0008 001 004 000030 000000 00000000 000 00020105610 0000 TPA TBFIL Tampa INTC & Defaul CNOH0079000H Drawing Fill
LOI 0523 002340 0019 0008 001 005 000030 000000 00000000 000 00020114753 0000 M1491 MATTRESS ONE *** MATTONE30MEMDAY13REV Sch.
LOI 0523 002410 0019 0008 001 006 000010 000000 00000000 000 00020112510 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 1 RE Sch.
LOI 0523 002600 0024 0007 001 001 000010 000000 00000000 000 00020112512 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 3 RE Sch.
LOI 0523 002610 0024 0007 001 002 000030 000000 00000000 000 00020113777 0000 000146029 Chevrolet Retail SE GMMQ0873000H Sch.
LOI 0523 002640 0024 0007 001 003 000030 000000 00000000 000 00020086664 0000 000138461 The Ticktin Law Gro 727 PETER 2012 REVIS Sch.
LOI 0523 002710 0024 0007 001 004 000030 000000 00000000 000 00020106386 0000 TPA LCPSA Tampa Local Filler Making Home Affordab Fill
LOI 0523 002740 0024 0007 001 005 000030 000000 00000000 000 00020111039 0000 000146231 FDOT FDOT Ped Safety (Eng Sch.
LOI 0523 002810 0024 0007 001 006 000030 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
LOI 0523 002840 0024 0007 001 007 000010 000000 00000000 000 00020112513 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 4 RE Sch.
LOI 0523 004100 0038 0008 001 001 000010 000000 00000000 000 00020107985 0000 000146174 HCA West Florida PIN1302516_TRAVEL_HC Sch.
LOI 0523 004110 0038 0008 001 002 000010 000000 00000000 000 00020114178 0000 000106365 Dick Norris Buick P PIN1302553 NEWBRK_Di Sch.
LOI 0523 004120 0038 0008 001 003 000030 000000 00000000 000 00020109784 0000 000153622 Nestle Waters N. Am XSOZ0014000H Sch.
LOI 0523 004150 0038 0008 001 004 000030 000000 00000000 000 00020097844 0000 TPA LCPSA Tampa Local Filler hurricane sandy reli Fill
LOI 0523 004220 0038 0008 001 005 000030 000000 00000000 000 00020109529 0000 000144951 BH Marketing -TPA BHNB012913JH 04HSD J Sch.
LOI 0523 004250 0038 0008 001 006 000030 000000 00000000 000 00020109871 0000 000102540 Bay News 9 Marketin BN9YOD130401_BN9 Fill
Reordering lines of content in a file
Re: Reordering lines of content in a file
Oh also, I have absolutely no clue how to build this so I'd be looking for your help!
Re: Reordering lines of content in a file
I'm afraid that I don't understand your goal.
I understand your task so:
You should make some corrections in schedule file, but unfortunately I don't understand the contents of this file.
It would be great if you send the sample of source of schedule file and the example of final file which you want to get as a result.
It seems that you need to swap some data in this file.
I understand your task so:
You should make some corrections in schedule file, but unfortunately I don't understand the contents of this file.
It would be great if you send the sample of source of schedule file and the example of final file which you want to get as a result.
It seems that you need to swap some data in this file.
Oleg Yershov
Re: Reordering lines of content in a file
Below is an example and in bold are the sections of the text that indicate the length of a commercial. Notice that when the schedule is found to have a :15 second commercial followed by a :10 second commercial, it swaps those lines around to have the :10 second commercial line and then the :15.
Before:
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
LOI 0523 002200 0019 0008 001 001 000010 000000 00000000 000 00020108796 0000 000109587 Brandon Ford HILLS1303204B_MARINE Sch.
LOI 0523 002210 0019 0008 001 002 000030 000000 00000000 000 00020110327 0000 000102540 Bay News 9 Marketin BN9IM130401_BN9 Brea Sch.
LOI 0523 002240 0019 0008 001 003 000030 000000 00000000 000 00020086664 0000 000138461 The Ticktin Law Gro 727 PETER 2012 REVIS Sch.
LOI 0523 002310 0019 0008 001 004 000030 000000 00000000 000 00020105610 0000 TPA TBFIL Tampa INTC & Defaul CNOH0079000H Drawing Fill
LOI 0523 002340 0019 0008 001 005 000030 000000 00000000 000 00020114753 0000 M1491 MATTRESS ONE *** MATTONE30MEMDAY13REV Sch.
LOI 0523 002410 0019 0008 001 006 000010 000000 00000000 000 00020112510 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 1 RE Sch.
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
After:
LOI 0523 002200 0019 0008 001 001 000010 000000 00000000 000 00020108796 0000 000109587 Brandon Ford HILLS1303204B_MARINE Sch.
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
LOI 0523 002210 0019 0008 001 002 000030 000000 00000000 000 00020110327 0000 000102540 Bay News 9 Marketin BN9IM130401_BN9 Brea Sch.
LOI 0523 002240 0019 0008 001 003 000030 000000 00000000 000 00020086664 0000 000138461 The Ticktin Law Gro 727 PETER 2012 REVIS Sch.
LOI 0523 002310 0019 0008 001 004 000030 000000 00000000 000 00020105610 0000 TPA TBFIL Tampa INTC & Defaul CNOH0079000H Drawing Fill
LOI 0523 002340 0019 0008 001 005 000030 000000 00000000 000 00020114753 0000 M1491 MATTRESS ONE *** MATTONE30MEMDAY13REV Sch.
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
LOI 0523 002410 0019 0008 001 006 000010 000000 00000000 000 00020112510 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 1 RE Sch.
Before:
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
LOI 0523 002200 0019 0008 001 001 000010 000000 00000000 000 00020108796 0000 000109587 Brandon Ford HILLS1303204B_MARINE Sch.
LOI 0523 002210 0019 0008 001 002 000030 000000 00000000 000 00020110327 0000 000102540 Bay News 9 Marketin BN9IM130401_BN9 Brea Sch.
LOI 0523 002240 0019 0008 001 003 000030 000000 00000000 000 00020086664 0000 000138461 The Ticktin Law Gro 727 PETER 2012 REVIS Sch.
LOI 0523 002310 0019 0008 001 004 000030 000000 00000000 000 00020105610 0000 TPA TBFIL Tampa INTC & Defaul CNOH0079000H Drawing Fill
LOI 0523 002340 0019 0008 001 005 000030 000000 00000000 000 00020114753 0000 M1491 MATTRESS ONE *** MATTONE30MEMDAY13REV Sch.
LOI 0523 002410 0019 0008 001 006 000010 000000 00000000 000 00020112510 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 1 RE Sch.
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
After:
LOI 0523 002200 0019 0008 001 001 000010 000000 00000000 000 00020108796 0000 000109587 Brandon Ford HILLS1303204B_MARINE Sch.
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
LOI 0523 002210 0019 0008 001 002 000030 000000 00000000 000 00020110327 0000 000102540 Bay News 9 Marketin BN9IM130401_BN9 Brea Sch.
LOI 0523 002240 0019 0008 001 003 000030 000000 00000000 000 00020086664 0000 000138461 The Ticktin Law Gro 727 PETER 2012 REVIS Sch.
LOI 0523 002310 0019 0008 001 004 000030 000000 00000000 000 00020105610 0000 TPA TBFIL Tampa INTC & Defaul CNOH0079000H Drawing Fill
LOI 0523 002340 0019 0008 001 005 000030 000000 00000000 000 00020114753 0000 M1491 MATTRESS ONE *** MATTONE30MEMDAY13REV Sch.
LOI 0523 002810 0024 0007 001 006 000015 000000 00000000 000 00020114723 0000 000150517 Gulf Coast Honda De GCH56278H Sch.
LOI 0523 002410 0019 0008 001 006 000010 000000 00000000 000 00020112510 0000 000144888 BN9 BB, ID, MKT PRO BN9 Exclusivity 1 RE Sch.
Re: Reordering lines of content in a file
Ok, I see. Your 1-st example doesn't contain 000015 lines. So I ask you more details.
Another question: how to determine the block where you should make reordering?
How many blocks does contain your 1-st example? Send me a couple of complete schedule files.
Another question: how to determine the block where you should make reordering?
How many blocks does contain your 1-st example? Send me a couple of complete schedule files.
Oleg Yershov
Re: Reordering lines of content in a file
Ok so the last sample I gave you had both 15's and 10's in it. The first sample file I sent was just an example of the files layout. I cant give you an entire file because currently we don't generate one with both 10's and 15's. That is why I provided you with my last example.
So as you can see in my last example, I have manually created a before and after. In the before, I am showing you what output would be like in the original file in just a 1 commercial break segment. How to identify when we need to make the swap is whenever you see a line that has a 15 followed by a 10 OR a 10 followed by a 15, the lines need to be flipflopped as shown in the "After" section.
For further clarification of the data fields, I have included a CCMS file format guide in attachements. I also included a full schedule file (without 15's) in the zip file attachment.
So as you can see in my last example, I have manually created a before and after. In the before, I am showing you what output would be like in the original file in just a 1 commercial break segment. How to identify when we need to make the swap is whenever you see a line that has a 15 followed by a 10 OR a 10 followed by a 15, the lines need to be flipflopped as shown in the "After" section.
For further clarification of the data fields, I have included a CCMS file format guide in attachements. I also included a full schedule file (without 15's) in the zip file attachment.
- Attachments
-
- CCMS Format Guide
- CCMS Format.GIF (80.26 KiB) Viewed 29840 times
-
52368020.zip
- Example Schedule File
- (14.78 KiB) Downloaded 2893 times
Re: Reordering lines of content in a file
The file you sent looks correct
It doesn't contain 000015 lines too.
Each block (the same field #4, "Window Start Time" ) looks correct
...000010...
...000030...
...000010...
It seems that it doesn't require any corrections
Where are "000015" lines?
It doesn't contain 000015 lines too.
Each block (the same field #4, "Window Start Time" ) looks correct
...000010...
...000030...
...000010...
It seems that it doesn't require any corrections
Where are "000015" lines?
Oleg Yershov
Re: Reordering lines of content in a file
I would do this in SAS, a very easy data step swap. SAS can read the entire contents of the file and analyze easily what are the rows before current row and what rows are coming next and reorder according to design
www.sas.com
Learner edition is free and it would take about 4 minutes to write a working app for what you have described
www.sas.com
Learner edition is free and it would take about 4 minutes to write a working app for what you have described