clean pobs data from p6 xer files

the other day one of our 世界杯2022亚洲比赛时间 members called our support line with an unusual p6 problem. i’m always happy to help out our members solve p6 problems, even when it’s 4:30pm on the friday afternoon before i’m off on a full week of vacation….

ok. full disclosure here.

i had already powered down my laptop for the weekend and was just about to grab something ice-cold and carbonated when the phone rang. i was hoping it was something we could solve quick or that i had already written a solution for. i was tired, and it was hot in the office. the patio was calling. this wasn’t how i was expecting to wrap up my week. oh well.

the call was was from doug (not his real name) from alberta, a 世界杯2022亚洲比赛时间 member who works for a large national construction company…and he was having problems with an xer file he was sending to a client. doug’s client was trying to import doug’s xer file, but it was taking hours to import not an exaggeration – doug said it took 6 hours for the client to import his p6 xer file successfully. something was clearly wrong.

sometimes you get those problems that just can’t stay away from because it’s something you haven’t seen before and curiousity just takes over. that’s what happened here for me. i was thinking “6 hours to import? how can that possibly be?”

so i made a bargain with myself. if i could help doug in the next 30 minutes (by 5pm), then i would reward myself with not one, but two ice-cold carbonated bevvies.  i would be on vacation after all and sometimes you have to motivate yourself!

now doug described his project schedule to me. it was a few thousand lines – not uncommon – and it was both resource and cost-loaded. he and his client were using primavera p6 professional v8.4.

i did some quick research online about slow importing of xer files, but there wasn’t any obvious leads there. here’s what i suggested to doug.

xer file slow to import into primavera p6? pobs xer file data may be the culprit

doug’s xer file was clearly taking too long to import. in this case, i can see 2 things that might need addressing:

  1. the xer file is is having issues.
  2. the client’s machine or database is having issues.

my experience is that most machines and databases don’t run into slow performance issues like they used to 10+ years ago…back in the day when you had too many background processes running on your pc and those programs would grind the processor to a halt. so i was thinking there was likely something going on with the xer file.

here’s what i recommended to doug:

a) rather than use the xer file format, try the xml format that p6 supports instead. 

the xml format functions much like the xer file format. there are some differences, but the project will come across regardless. if the xml file imports quickly, then there’s a problem with the xer file.

b) remove the pobs data from the xer file.

this solution was suggested recently on planningplanet where this pobs issue came to my attention (and thanks to the smart p6 experts who suggested it there). i’ll outline the steps to easily removing pobs data soon, including a tip that will be a major timesaver, but first, what did doug do?

doug opted to try suggestion b). by removing the pobs data from his xer file, we found that he was able to reduce his file’s size from 25mb down to 2mb! wow! that’s a lot of pobs data!

for doug, removing the p6 pobs data also reduced the import time from 6 hours to >2 minutes! that’s an exponential improvement!

yes, we got doug fixed and i made it to the patio and kicked off a great vacation week. but i’m not finished with this pobs issue. i’m not completely sure why it’s cropping up right now, but i’ve seen enough online grumblings about it to want to tackle it in detail.

so let’s dig in and get down to the bottom of pobs data and xer files in primavera p6.

what is pobs data?

since this is a fairly new issue with p6, i’ve done some homework around the pobs data issue.

every primavera p6 database has a pobs table. looking at the primavera p6 database schema docs, pobs stands for performing organizational breakdown structure. the pobs data isn’t used (yet) by primavera p6 professional or primavera p6 eppm. here’s what an oracle support doc titled what is the pobs table used for and what data is stored in pobs? (doc id 1959228.1)” had to say:

functions related to table pobs have not been implemented yet so the table has not been put to use. the table may be removed in a future release.

if there is data in this table, then it’s probably present in the sample database and not inserted during operations performed in the application.

that doc says it applies to primavera p6 eppm v7.0.3.0 or later.

what are the problems with pobs data & xer files?

another support doc discussed how the pobs table is getting overly large and affecting performance of the application. let’s cover that issue another time.

however, at least 1 bug has been logged for performance issues related to pobs data (bug 20800033 : exclude pobs data from xer export & import operations), and the bug had this to say about xer import issues:

we do not utilize the pobs table yet we export/import the data from this
table when completing xer export/import.  the xer export/import should be
written to exclude this data with xer export/import operations of p6
professional.

so essentially, here’s what we know:

  • pobs data exists in the pobs table in the p6 database
  • pobs data is exported and imported via xer file
  • pobs data isn’t used for anything
  • too much pobs data can affect performance of import (and maybe export)

i have a hunch that pobs data is related to primavera cost manager, a now-defunct cost management solution that was once part of the primavera suite years ago. primavera cost manager integrated tightly with p6 professional and looking at documentation that still exists, there was a concept of a performing organizational breakdown structure in cost manager. but alas, only oracle can confirm this.

how can i clean pobs data from my xer file?

[note: a simple alternate solution is provided at the bottom of this post]

we’ve already shown you how can you clean global data from xer files with the xer file parser, but this solution is much simpler. let me start by saying you can do this the  s..l..o…w  way or the quick way (my way). let me show you how it’s done.

first, export your project to an xer file.

since xer files are actually text files, you can edit them with a text editor like notepad. here’s what one looks like when you open it up:

clean pobs xer file 1

we’re going to delete a section of data from the file. to denote a new section, look for a “%t”. to find the pobs section, look for “%t    pobs”. that indicates the start of the pobs data in your file. you should see it somewhere near the top of the file in first 100 lines. above, you can see it on line 29 of the file.

deleting pobs data

basically, the process is to delete all lines starting from (and including) the “%t    pobs” line, until the next “%t” in the file. do not delete the next “%t” line.

so if you’re using notepad, you can simply highlight this huge swath of text and hit delete.

clean pobs xer file p6 2

in my example above, there’s less than 200 lines to highlight so it’s pretty easy.

but you’ll see that the amount of pobs data isn’t consistent. here’s a short 30-activity project schedule as viewed in a text viewer.

p6 pobs data xer file

the image above might be more typical. the pobs data spans from line 29 to line 4412. most of this file is pobs data!

so if you’ve got a huge file and a huge amount of pobs to clear out of your xer file, let me know you the quick way to clean it.

the quick way to clean pobs data from a p6 xer file

let’s begin. first, you’ll need some better text editing tools than simple windows notepad. i’m recommeding notepad++; free and easy to use. it’s worth the download!

1) make a backup of your xer file first. edit your file in notepad++.

2) find the “%t    pobs” line in your file – somewhere in the first 50 lines. note what line number this is, you’ll need it later.

3) now, let’s find the next “%t” line. place your cursor at the end of the “%t    pobs” line. hit ctrl+f (or use the search menu) and search for the next “%t” occurrence in the file.

find the next %t in xer file

4) make a note of the line number you’ve been taken to. mine was line 4415.

cleaning pobs data from an xer file

5) now we’re going to use some tools to highlight the pobs data since we know the line numbers. go back to the “%t    pobs” line. place your cursor at the beginning of the line. now goto edit -> begin/end select. this essentially tells notepad++ to start highlighting here.

clean pobs data with notepad++

6) now hit ctrl+g (or goto search -> goto). make sure to choose line and type in the line number from step 4) – for me 4415.

goto line notepad++

7) now that you’re on the next %t line, tell notepad++ to end the highlighting here. goto the edit menu and uncheck begin/end highlighting.

clean pobs xer file with notepad++

8) now all of your pobs data is highlighted. simply tap delete or backspace to remove it from the file. make sure you delete the %t pobs line as well, but not any other lines.

9) save the file and import.

for the xer file i used in this writeup, removing the pobs data took it from 4489 lines down to 102 lines. and it reduced the file from 564kb down to a mere 21kb.

why are primavera p6 users having issues with pobs now?

that’s a tough question.

reports from oracle say that once primavera p6 pobs data is in your database, it will be exported along with an xer file. the receiving database will then “be infected” with this data. the data seems to build up in the database (something i’ll cover fixing in my next post) and continues to grow as files go back and forth.

but why is this suddenly an issue now?

one theory i have is that a recent release, possibly primavera p6 v8.4, had pobs data in the sample database that is often setup at install time. i’m choosing v8.4 as it was referenced in the bug i mentioned earlier in this post. users often use the sample database as a production database and the data could be propagating from there.

whatever my theories are, these pobs issues seem to be appearing more and more.

conclusion

if you’re having difficulties with performance importing or exporting primavera p6 xer files, try cleaning the pobs data from them. yes, you can use windows notepad, but if the file is large, you’ll be scrolling for an hour. try using the techniques i’ve shown above along with the notepad++ text editor to save you time.

i fully recognize that what i’m offering here isn’t truly a permanent solution. constantly editing xer files to have a reasonable import time isn’t viable and it is a product issue that needs to be addressed by oracle. here’s hoping this gets you by in the meantime.

in my next post, i discuss the pobs table in your primavera p6 database and strategies to keep it clean or empty. read it now – how to clean your p6 pobs table on mssql & oracle db.

update – 2016

it turns out that using notepad is really too tedious, although some commenters on this post had some great suggestions for making that process easier. but let me make life even easier by recommending a simple utility created by 世界杯2022亚洲比赛时间 reader and senior planning engineer ahmet kochan. ahmet’s pobs cleaner is dead simple to use and free! pobs cleaner can clean 1 or more xer files at the same time. it creates a newly cleaned version of your xer file with the extension __cleaned.xer in case you ever need the original file.

pobs-cleaner-tool

there are some other tools on the market that clean pobs from xer files, but ahmet’s tool is free and so simple to use that i highly recommend it.

download pobs cleaner

enjoy! pobs cleaner is even packaged here with a test project so you can see how it works before you use it on a real project.