1. Stuart Macandrew
  2. PowerBuilder
  3. Thursday, 15 March 2018 02:21 AM UTC

I have started to look at an Orca script to create our pbl libraries and import source (boot strapping).

This is based on Bruce Armstrong's blog (https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/175-continuous-integration-with-powerbuilder-2017-bonobo-git-and-jenkins)

So my orca script is

start session
set debug true
scc set connect property logfile _log
scc connect offline
scc set target _target refresh_all importonly
;scc set target _target importonly
;scc exclude liblist "pbdom\pbdom170.pbd"   
scc refresh target migrate   
;scc refresh target 3pass   
scc close
end session

My libraries get created. However this errors on my first library at import with this error, so my libraries end up empty;

PBORCA_SccRefreshTarget. Migrate and Full Rebuild 
Calling cm_rebuild_application(CM_REBUILD_MIGRATE).
 Library: c:\jenkins\workspace\sample\desktop\lol\desktop\crsapp\crsapp.pbl
     Object: crs
         Forward Declarations
             (0004): Error       C0001: Illegal data type: n_tr
Errors encountered during import/compile.  Check SMS log.
PBORCA_SccClose

This refers to my global application transaction declaration (n_tr) for SQLCA. It appears that Orca does not handle global declarations, as the data type referred to has not been imported yet.

I can see several posts reporting this same issue over the years, but with no resolution posted that I can find. Not using orca but purchasing Powergen appears to be a solution.

Is there a solution or workaround for this.

 

René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 15 March 2018 06:38 AM UTC
  2. PowerBuilder
  3. # 1

Have you tried

scc refresh target 3pass

instead of

scc refresh target migrate

?

Comment
  1. Stuart Macandrew
  2. Thursday, 15 March 2018 19:52 PM UTC
Yes, tried both (individually and in combination).

  1. Helpful
  1. James Kollar
  2. Tuesday, 20 March 2018 18:22 PM UTC
I was unable to get 3 pass to work.



I got it to work by using:



scc refresh target incremental



This get you past the errors.



Then I created a second script with



set application...



set liblist...



build application...



and then run that until I get no errors.



final step is to create a script to build the libraries (we use pbds for each pbl) and then



build executable...



Not fun but it works every time unless your PBGs are messed up.



Was using pborca before to make this somewhat easier but wanted to move completely to an Appeon environment so now every thing works with orcascr17.exe



 



 



 



 



n a script

  1. Helpful
  1. Vipin Dwivedi
  2. Tuesday, 5 June 2018 20:42 PM UTC
Can you tell me the script, how you did with Incremental. Mine is faling with incremental as well. Getting so many forward declaration error: Illegal dataType. Seems Objects are not able to import successfully.



Regards,



Vipin

  1. Helpful
There are no comments made yet.
Konstantin Goldobin Accepted Answer Pending Moderation
  1. Wednesday, 21 March 2018 07:32 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

When I only started looking into using OrcaScript I also remember having this issue. If I don't mix it up with something else, it turned out that the current folder is important. So, let's say in a batch file I had to set the current folder to the root folder of my workspace (where the workspace file is located):

echo ================================
echo Creating PBL files
echo ================================
cd MyApp_pb2017
orcascr170 ..\create_myapp_pbls.orca

 

and in the script file itself I had to specify the full relative path to the target file:

start session
set debug true
scc set connect property logfile "create_myapp_pbls.log"
scc connect offline
scc set target "_MyApp\my_app\myapp.pbt" importonly
scc refresh target 3pass
scc close
end session

After that it started working. HTH!

 

 

Comment
  1. Govinda Lopez @Appeon
  2. Friday, 23 March 2018 15:30 PM UTC
Hi All,



 



Please also make sure your files and/or folders are not "Read Only" and that the proper permissions are in place.



 



Regards,

  1. Helpful
  1. Vipin Dwivedi
  2. Tuesday, 5 June 2018 20:39 PM UTC
I tried the same as I was getting the n_tr error. Here What steps I am following.



1 - Put all *.SR*, *.PBG, PBT and PBW file in one folder say PB-EQUIP. So all my PB objects are in one folder.



2 - I created the batch file where I am using below command



                           cd "C:\Program Files (x86)\Jenkins\workspace\EQUIP183_BUILD\pb-equip"

                           orcascr170 "C:\Program Files (x86)\Jenkins\workspace\EQUIP183_BUILD\createpbls.orca"



So I am changing my current directory to the folder where I kept all my PB objects.



3 - Now I am calling the batch file. The orca script command I kept like below



                     start session

                     set debug true  

                     scc set connect property logfile "createpbls.log"  

                     scc connect offline

                     scc set target "units.pbt" importonly

                     scc refresh target 3pass

                     scc close   

                     end session



When I am running the ORCA script, it starts importing the objects into PBLS, I can see the size of PBLs are growing but after it imports done, I gives me so many object error, like invalid object n_xyz etc. I checked all the error objects where it fails, but these objects (*.SR) files exists to that folder. My PBG files are straight forward. there is no relative path in the PBG files. Below is example of one PBG file.



Save Format v3.0(19990112)

@begin Libraries

 "fi_frjd_vz.pbl" "";

@end;

@begin Objects 

 "d_autodesa_registration_wt.srd" "fi_frjd_vz.pbl";

 "d_bc_error_response_wt.srd" "fi_frjd_vz.pbl";

 "d_bc_resp_parceltracking_wt.srd" "fi_frjd_vz.pbl";

 "d_detail_enq_ack_wt.srd" "fi_frjd_vz.pbl";

@end;



But still I am getting so many illegal data type errors. (All the illegal objects do exists in PBG as well in Folder). What I am doing wrong here?



Please guide me.



Regards,



Vipin

  1. Helpful
There are no comments made yet.
Richard Brady Accepted Answer Pending Moderation
  1. Wednesday, 30 January 2019 14:27 PM UTC
  2. PowerBuilder
  3. # 3

I was having the same problem with "Illegal datatype n_tr" and empty PBLs but I have solved it.

My original script was:

start session

set debug true

scc set connect property logfile "BuildPBLs.log"

scc connect offline

scc set target targetpath "refresh_all" "importonly"

scc refresh target "3pass"

scc close

end session

Which throws this error:

scc refresh target 3pass
Orca error in 'scc refresh target '. Result Code -22.
SCC operation failed. See SMS log.
An undetermined Scc error occurred.
Last Command Failed.

And the log says:

PBORCA_SccRefreshTarget.
Calling cm_rebuild_application(CM_REBUILD_MIGRATE).
 Library: c:\build\matrix\assuremax\pbl\pipe_app\pipe_app.pbl
     Object: app
         Forward Declarations
             (0004): Error       C0001: Illegal data type: n_tr
Errors encountered during import/compile.  Check SMS log.

Thanks to the comments here regarding PBG paths I found that mine is also a path problem.

We have a suite of PB applications that we build at once and our build folder structure is:

C:/BUILD - All build scripts

C:/BUILD/Suite

C:/BUILD/Suite/Application1 - Individual PB app

C:/BUILD/Suite/Application2

C:/BUILD/Suite/Application3

...

I was running from C:/BUILD

C:\BUILD> orcascr170.exe /D targetpath=C:\BUILD\Suite\Application1\PBL\Application1.pbt C:\BUILD\BuildPBL.orc

My PBG files contain relative paths like this

 "Application1\\PBL\\am_dddw\\d_dddw_am_equip_install_insp_procedures.srd" "Application1\\PBL\\am_dddw\\am_dddw.pbl";
 "Application1\\PBL\\am_dddw\\d_dddw_am_pressure_test_procedures.srd" "Application1\\PBL\\am_dddw\\am_dddw.pbl";

That's fine during development but invalid relative to C:\BUILD.

I had to tell ORCAscr where the project root folder was using the localprojpath property.

The new script is:

start session

set debug true

scc set connect property logfile "BuildPBL.log"

scc set connect property localprojpath "C:\BUILD\Suite"

scc connect offline

scc set target targetpath "refresh_all" "importonly"

scc refresh target "3pass"

scc close

end session

 Now the PBLs are created successfully

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.