Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 25 AUG 2008 06:55:38PM James wrote:

Hi all,

I was wanting to recompile all procs referencing a particular insert following its change. All the procs are being gathered ok, and I can recompile within the *current* account, however the inherited ones fail with error code: REP120. Is there a way to compile a routine for an inherited account (as occurs within the SRP editor)?

Following is the code re: recompilation part.

         * setup params 
         [/color]proc_entity_id=this_procaccount:[/color]'*STPROC**'[/color]:this_procname 
         recompile_if_unchanged=true$ ;[/color]* always force compile 
         [/color]cleanup_orphan_entities=false$ 
         creserve_linemarks=false$ 
         [/color] 
         [/color]* compile and check response 
         [/color]result=Repository([/color]'COMPILE'[/color], proc_entity_id, recompile_if_unchanged, cleanup_orphan_entities, preserve_linemarks) 
         [/color]begin case 
            case [/color]result=[/color]'' [/color]or [/color]result=false$ 
               [/color]If [/color]Get_Status(ErrorDetails) [/color]then 
                  [/color]proc_compilation_errors1] [/color]= proc_desc:[/color]' - Error: '[/color]:ErrorDetails1[/color],[/color]1][/color]:[/color]', Line: '[/color]:ErrorDetails1[/color],[/color]2][/color]:[/color]' - Hint: '[/color]:ErrorDetails1[/color],[/color]3] 
               [/color]end 
               call [/color]set_status([/color]0[/color]) ;[/color]* reset error state, otherwise next compile attempt will immediately fail.. 
            [/color]case [/color]result=[/color]1 [/color];[/color]* compile not needed 
               [/color]compileCount += [/color]1 
            [/color]case [/color]result1] [/color]= 2 [/color];[/color]* ok - success! 
               [/color]// result=compile time 
               [/color]compileCount += [/color]1 
         [/color]end case[/color][/color]         
               

At 25 AUG 2008 07:01PM David Goddard wrote:

G'day James,

I think you will need to recompile procs in the app that they belong to.

A REP120 error means that the entity is inherited and cannot be changed in the current app.

Dave G


At 25 AUG 2008 07:06PM James wrote:

Gday Dave - wow quick response :)

So how does the SRP editor do it!?


At 25 AUG 2008 07:30PM [url=http://www.srpcs.com]SRP[/url]'s Kevin Fournier wrote:

James,

When you load an inherited stored procedure in the SRP Editor, it creates a temporary copy in the current app. When you compile, it compiles the temporary copy and copies the object code back into the inherited app. When you close the stored procedure, the temporary copy is deleted.

It was a bit of a headache to implement and to make all the micromanagement work, but the trick has made us more productive on multiple occasions.

[email protected]

SRP Computer Solutions, Inc.


At 25 AUG 2008 07:46PM Kyle Amadio wrote:

Hi Kevin

You are not kidding, that is a REALLY fantastic feature. Well done and thanks for the info.


At 27 AUG 2008 03:22PM Karen Oland wrote:

As another satisfied SRP customer, I can say it works well (and so seemlessly that I forget we are "supposed" to go back to sysprog to work on something, as I never do so).

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/75828011ea0ea262852574b0007df192.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1