Protected Project

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Protected Project

Post by Romy »

when we protect or unprotect a project which variable or file will be updated in the server. Can anyone help me to know the name of the file and the path, so that instead of login to the administrator i can see the value in the file and know the protect or unprotected status of the project.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's not recorded in a file. It's recorded in an entry in a database table in the repository.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post by Romy »

Is there anyway to access it as a dsadmin..
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post by Romy »

How to get the value for this flag
DSRProjectProtected ;* flag to indicate if project is protected

I found this line in the DSR_COMM.H
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

That is in a header so I would think you might wrap it with a C/C++ program? but then you would have to understand the API and create an object reference and a bunch of other things - is there some reason you need to know this outside of looking in the administrator client?
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post by Romy »

Ok thanks. I have to manually check whether all the projects are protected in the server. So i thought of writing a UNIX script by fetching this flag value so that it when i trigger the script it will let me know which projects are all protected. Thats the reason i thought of digging but didnt end up in finding a solution to it.

Is there anyother way to workout my idea?
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

No offense, but exactly how many projects do you have??
Surely you could check them in the time it took to post?

Not having a go, just curious how many projects some people have.
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post by Romy »

More than 40 projects that is split across different servers.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Wow, that is a fair few. I can see why you'd want to automate it now...

As Ray said, it'll be in XMETA somewhere. No idea where though.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Once place that the project's status as protected or not is visible is in the UV.ACCOUNTS file, the following query should list all protected projects:

Code: Select all

LIST UV.ACCOUNT ID.SUP @ID WITH EVAL 'FIELD(NAME,"\",4)' = 46256
A BASIC routine to return 0 for unprotected and 1 for protected would be

Routine IsProtectected(ProjectName)

Code: Select all

   Ans = 0 ;** assume unprotected project
   OPEN '','UV.ACCOUNT' TO UvAccountFilePtr ELSE CALL DSLogFatal('Unable to open UV.ACCOUNT file, error is "':STATUS():'".','')
   READ UvAccountRecord FROM UvAccountFilePtr, ProjectName
   THEN
      IF FIELD(UvAccountRecord<7>,'\',4) = 46256 THEN Ans = 1
   END
   ELSE
      CALL DSLogWarn('Project "':ProjectName:'" does not exist.','')
   END
   CLOSE UvAccountFilePtr
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post by Romy »

Thanks Arndw, but it didnt work for me .I tried the routine. It is giving the value 0 for all projects, even if that project doesnt exist.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Mark at least two projects as protected. Execute

Code: Select all

LIST UV.ACCOUNT ID.SUP @ID EVAL 'FIELD(NAME,"\",4)'
the numeric values should be the same for the two or more protected projects and different for the non-protected ones. Is that the case?
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post by Romy »

I am getting different numbers for each project. one thing i observed is, if i am making any changes like protecting or unprotecting it the number gets changed to different one.
Romy
Participant
Posts: 26
Joined: Thu Nov 13, 2008 3:37 am
Location: Chennai

Post by Romy »

I am getting different numbers for each project. one thing i observed is, if i am making any changes like protecting or unprotecting it the number gets changed to different one.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I was afraid of that - I'm currently on Windows and assume that the checksum is computed differently.
Unfortunately, that is the only way I know of getting the project status so the answer to your question is "No, one cannot get the protected/unprotected status"
Post Reply