Home
TeamSite
Editing DCR's Manually
mbjennings
O.K. I am editing DCR's Manually from a Samba mount. Teamsite is on Unix, but I have NT. Now when I edit a DCR manually from the samba mount and try to bring up the edited DCR in Teamsite's Templating GUI, it gives me an error, saying " error occurred in the program dcr_value" So how can I edit these DCR's manually and keep them tied to the correct DCT or TPL? Maybe there are a few questions in this one. Thanks in advance for any replies.
Find more posts tagged with
Comments
tvaughan
Check out what the DCR looks like on the Solaris filesystem after you've editing it in NT.
Do you see a bunch of ^M characters all over the place? That could get you. Try running the command dos2unix on the DCR and see if that helps.
Tom
mbjennings
I looked at the file on the Unix side, and it did not have the ^M's in there. I have ran into that before, so that was one of the first things I checked.
O.K. Now when I edit the DCR in Unix, I can pull up the DCR in Teamsite just fine when I click on Edit Data Record. But I cannot view it when I edit it through NT samba mount. What gives?
tvaughan
Are you expecting the DCR to come up in the Data Capture Template form through the samba mount?
I'm not running samba, so I don't know what the expected behavior is, but it seems as though that'd be "a lot" to expect (though not in the grand scheme of things, I suppose ;-)
The way Interwoven "knows" to pull up the DCR in the DCT is via the extended attributes, right? So is it maybe the case that samba is just downloading something with no extension to your C drive and then your windows OS is taking over assigning an editor to it?
That doesn't explain the error you initially got, though, does it?
Tom
mbjennings
I don't want the Templating GUI to come up when I click on the file to edit through the samba mount. I just want to edit it with notepad or whatever. I am only changing a few of the properties, like instead of calling a .jhtml file, it calls a .jsp file. So nothing big, but I will have to change multiple files, so I do not want to pull up the Templating GUI on every file.
All the samba mount allows me to do is view the Files through Windows explorer through mapping a drive to the unix directory. So it could be something to do with the OS.
Thanks for your reply. I have to ask some more questions to our Teamsite Admin.
But I am still wondering how everyone else is going about doing this?
tvaughan
Hmm. . .one thing worth checking is whether the external attributes get messed up after you edit a DCR with a windows program and upload it via Samba.
If you've got shell access to your IW server, run the
iw-home
/bin/iwextattr
/some/path/dcr_name
on your DCR before and after a windows edit and see if the
TeamSite/Templating/DCR/Type
changes.
Tom
gsumers22texas
I was about to reply with a suggestion to run iwextattr CLT to reset the EAs, but I see Tom already did on the last reply
I'll second his recommendation- also know you have to run this if you ever want to move/copy/deploy the DCR to another location (workarea, branch, or another server (dev,uat, etc)) and then open it for editing in Templating
Greg
mbjennings
I am trying to run this program on this directory, is something wrong? It is not giving me an error, but it is not converting the DCR either. What feedback should I get.
/local/iw-home/bin/iwextattr /iwmnt/default/main/FBU/Fleetguard.com/WORKAREA/mbjennings/templatedata/FBUJSP/Template1/data/en/RegionalNews/en_news_europe_nelbur_marine
tvaughan
Ahhh . . .
Check out the Command Line Tool reference (CLT).
It doesn't "convert" the DCR. . . it just applies or removes or displays external attributes to files. What you probably want to do is something like this:
iwextattr -s TeamSite/Templating/DCR/Type=
category/type name-of-file
For example,
iwextattr TeamSite/Templating/DCR/Type=fm_news/archives MyNewsDCR
Then, if you run
iwextattr on MyNewsDCR
It should show you:
TeamSite/Templating/DCR/Type=fm_news/archives
You could add arbitrary key=vaule pairs to any file in your backing store.
To find out exactly what cateory/type you need to set, check out your templating.cfg file.
Tom
mbjennings
Thanks for all of the Help guys! This is a great Site!
O.K. Now I have the file creating the attributes. But I have to run this program for every file? I want to run it on a certain directory, is it possible?
Adam Stoller
Unfortunately, yes - you will have to run that command at least once for each and every file that requires having extended attributes added to them. I would suggest scripting the process as much as possible.
--fish
(Interwoven, Curriculum Development)
jdoris
should be easy enough to whip up a script that runs the iwextattr command on each file in a given directory.
ie, in perl:
#!/usr/bin/perl
use strict;
my $dir = "/path/to/dir";
my
@filelist
= `ls $dir`;
foreach my $file(
@filelist)
{
if (!($file eq "." || $file eq "..")) {
`iwextattr -s TeamSite/Templating/DCR/Type=fm_news/archives $file`;
}
}
...better of course if you pull the "." and ".." files from the array outside of the foreach loop, but just to give you an idea.
Edited by jdoris on 11/01/02 12:42 PM (server time).
Adam Stoller
The code could use a bit of performance tuning, but more importantly you'd want to verify that '$file' is not a directory - and then decide whether or not you want to recurse through it if it is.
You might want to look at using File::Find...
--fish
(Interwoven Information Guy)
jdoris
true. ok, i put another minute and a half into this and came up with this instead:
#!/usr/bin/perl
$|++;
use strict;
my $dir = "/path/to/dir";
my
@filelist
= `ls $dir`;
foreach my $file(
@filelist)
{
next if -d($file);
`iwextattr -s TeamSite/Templating/DCR/Type=fm_news/archives $file`;
}
OR
if you wanna do like ghoti said, use File::Find --
#!/usr/bin/perl
$|++;
use strict;
use File::Find;
my $dir = "/path/to/dir";
find (\&iwextattr, $dir);
sub iwextattr
{
next if -d($_);
`iwextattr -s TeamSite/Templating/DCR/Type=fm_news/archives $_`;
}