Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Regenerating PBLs with Orca Script

1,416 views
Skip to first unread message

Chris Kean

unread,
Jan 17, 2008, 10:05:29 AM1/17/08
to
So I'm trying it again.

I've taken one of the applications I recently reorganized and cleaned up the
directory structure. As its currently laid out, each PBL has its own
directory, so I know what files go where.

BTW, this is PB 10.5.1.6684 and Surround SCM 5.0.3.34.

I took my existing directory, grabbed the workspace and the target file, and
renamed it. I recreated the directory and put the workspace and target in
it, along with a text file with the OrcaScript parameters below:

/***/
start session

SCC get connect properties "ReportsService.pbw"
SCC set connect property logFile "ORCALog.txt"

SCC Connect
SCC set target "H:\Level 3\Report Framework\report_framework.pbt"
"refresh_all"
SCC refresh target full
SCC close

end session
/***/

All goes well for about a minute or 2, I can see all the files populate into
the directory, the PBLs get created, etc. Then, I get:

/***/
Orca error in 'scc refresh target '. Result Code -22.
SCC operation failed. See SMS log.
An undetermined Scc error occurred.
/***/

When I check the ORCALog.txt I generated, everything is hunky-dory until:

/***/
Bootstrapping Application...
PBORCA_SccRefreshTarget. Full Rebuild
Calling cm_rebuild_application(CM_REBUILD_FULL).
Library: h:\level 3\report framework\main\report_framework.pbl
Object: report_framework
Forward Declarations
(0004): Error C0001: Illegal data type: uo_trans
Object: w_sheet
Instance Variables
(0004): Error C0001: Illegal data type: n_transaction
Object: m_main
Event: m_daycrewcalendar::clicked
(0002): Error C0015: Undefined variable: w_crew_cal_print
Object: uo_trans
Forward Declarations
(0002): Error C0001: Illegal data type: n_transaction
Object: n_cst_reportframeworkappservice
Forward Declarations
(0002): Error C0001: Illegal data type:
ancestor_n_cst_clientserverappservice
Object: w_main
Function: w_main::wf_init
(0017): Error C0163: The definition of referenced global
variable gnv_reportframework was improperly compiled in object
report_framework
Object: w_main
Function: w_main::wf_init
(0022): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
(0026): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
Object: w_report_list
Function: w_report_list::wf_select_report
(0017): Error C0163: The definition of referenced global
variable sqlca was improperly compiled in object report_framework
Object: w_report_list
Function: w_report_list::wf_select_report
(0023): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
(0024): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
(0025): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
Library: h:\level 3\report
framework\applicationdataservice\applicationdataservice.pbl
Object: n_cst_interfacemanager
Instance Variables
(0013): Error C0001: Illegal data type:
n_cst_messagesservice
Library: h:\level 3\report
framework\reportssortfilter\reportssortfilter.pbl
Object: n_cst_reports_sort_filter
Instance Variables
(0002): Error C0001: Illegal data type: n_datastore
Object: w_filter
Forward Declarations
(0006): Error C0001: Illegal data type: u_datawindow
Object: w_sort
Forward Declarations
(0004): Error C0001: Illegal data type: u_datawindow
Library: h:\level 3\report
framework\documentsdeliveryclient\documentsdeliveryclient.pbl
Object: w_recipients_list
Forward Declarations
(0028): Error C0001: Illegal data type: u_datawindow
Object: w_delivery_request
Function: w_delivery_request::setsenderinfo
(0025): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
(0039): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
(0073): Error C0163: The definition of referenced global
variable sqlca was improperly compiled in object report_framework
(0076): Error C0194: Missing pcode block for indirect
function. Possible cause: library missing from library list.
Object: n_cst_documents_delivery_client
Instance Variables
(0003): Error C0001: Illegal data type: n_datastore
Library: h:\level 3\report
framework\applicationdataservice\applicationdataservice.pbl
Object: n_cst_dataset
Instance Variables
(0005): Error C0001: Illegal data type: n_datastore
Library: h:\level 3\report
framework\reportsmasterclient\reportsmasterclient.pbl
Object: n_cst_reportmasterim
Instance Variables
(0003): Error C0001: Illegal data type: n_datastore
Object: n_cst_availablereports
Instance Variables
(0002): Error C0001: Illegal data type: n_datastore
Errors encountered during import/compile. Check SMS log.
PBORCA_SccClose
1/17/2008 09:59 Source control terminated
/***/

It seems like Orca isn't handling the ancestor objects properly. I tried
opening the target in PB10.5 after this failure, and it tells me to migrate
all the PBLs in the target. When I let it, I get pretty much the exact same
list of illegal datatypes and failures.

So what am I doing wrong?

Thanks in advance,

Chris


Bruce Armstrong [TeamSybase]

unread,
Jan 17, 2008, 12:23:26 PM1/17/08
to

If you're trying to recreate the PBLs from source, you should use the
migrate option rather than full. That lets ORCAScript know that it needs to
be able to deal with missing ancestors during import.

scc refresh target migrate

"Chris Kean" <christop...@stld-cci.com> wrote in message
news:478f6eb9@forums-1-dub...

Paul Horan[TeamSybase]

unread,
Jan 17, 2008, 12:24:34 PM1/17/08
to
Missing:
set liblist [pbllist] and
set application pblname applicationname

Question: why are you doing a refresh target full? Are you doing a
bootstrap import of source code into empty PBLs? If so, you can use CONNECT
OFFLINE, since you've already used the Surround SCM commandline tool to
extract the current source from the repository... For that use case, you
don't need OrcaScript to actually connect to SCM.

Paul Horan[TeamSybase]

"Chris Kean" <christop...@stld-cci.com> wrote in message
news:478f6eb9@forums-1-dub...

Chris Kean

unread,
Jan 17, 2008, 1:52:27 PM1/17/08
to
changing to migrate produces the same errors, but with:

/***/
PBORCA_SccRefreshTarget: Migrate and Full Rebuild
Calling cm_rebuild_application(CM_REBUILD_MIGRATE)
/***/

All the ancestor objects still fail.

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:478f8f0e$1@forums-1-dub...

Chris Kean

unread,
Jan 17, 2008, 1:56:13 PM1/17/08
to
Looking at the log files, I see:

/***/
Target settings: REFRESH ALL
App Name: report_framework App Lib: h:\level 3\report
framework\main\report_framework.pbl
Library List:


h:\level 3\report framework\main\report_framework.pbl

h:\level 3\report framework\reportssortfilter\reportssortfilter.pbl

h:\level 3\report
framework\documentsdeliveryclient\documentsdeliveryclient.pbl

h:\level 3\report
framework\applicationdataservice\applicationdataservice.pbl

h:\level 3\report framework\reportsmasterclient\reportsmasterclient.pbl

h:\level 3\report framework\calendar\calendar.pbl
h:\level 3\report framework\clientdblogin\clientdblogin.pbl
h:\level 3\report framework\reports children\reports_children.pbl
/***/

Do I still need to actually set the PBL List and app name? It appears its
getting them from the target without any trouble.

Regarding the question, I originally just started with the target and
workspace, no other files from source control. I'll try doing a get latest
from Source and doing everything again to see if maybe stuff's just not
getting to the right place. But, I'm letting Orca create the PBLs and stick
the source in them. I think that answers your question.

"Paul Horan[TeamSybase]" <phoran AT sybase DOT com> wrote in message
news:478f8f52@forums-1-dub...

Chris Kean

unread,
Jan 17, 2008, 3:27:34 PM1/17/08
to
OK,

So problem number 1 was that my pbg's were all junk. Hardly any of them had
the correct files listed for the PBL. So after going through and cleaning
them all up, I now get the following results:

Connect Offline: Rebuild fails immediately, regardless of migrate or full on
first object with an ancestor

IMPORTONLY: Same result as offline

No target option, full refresh: Fails on first object with an ancestor, as
above

No target option, migrate refresh: Succeeds, but PBLs have some out of date
files (randomly distributed) and root directory where target and workspace
are is now full of exported object files that need to be deleted.

So the last option is working, just not 100%.

Any hints for not having my directory full of source files or making sure
that source is 100% up to date? The ones i had to update after creation were
actually the version before the most recent, so I don't know if its a
powerbuilder issue or an SCM issue.

Thanks!

"Chris Kean" <christop...@stld-cci.com> wrote in message
news:478f6eb9@forums-1-dub...

Jeremy Lakeman

unread,
Jan 17, 2008, 5:45:38 PM1/17/08
to
On Jan 18, 6:27 am, "Chris Kean" <christopher.k...@stld-cci.com>
wrote:

> OK,
>
> So problem number 1 was that my pbg's were all junk. Hardly any of them had
> the correct files listed for the PBL. So after going through and cleaning
> them all up, I now get the following results:
>
> Connect Offline: Rebuild fails immediately, regardless of migrate or full on
> first object with an ancestor
>
> IMPORTONLY: Same result as offline
>
> No target option, full refresh: Fails on first object with an ancestor, as
> above
>
> No target option, migrate refresh: Succeeds, but PBLs have some out of date
> files (randomly distributed) and root directory where target and workspace
> are is now full of exported object files that need to be deleted.
>
> So the last option is working, just not 100%.
>
> Any hints for not having my directory full of source files or making sure
> that source is 100% up to date? The ones i had to update after creation were
> actually the version before the most recent, so I don't know if its a
> powerbuilder issue or an SCM issue.
>
> Thanks!
>
> "Chris Kean" <christopher.k...@stld-cci.com> wrote in message

pbg files should have path information relative to the scc local root
folder.

eg for .\x\x.pbl containing foo.srd

Save Format v3.0(19990112)
@begin Libraries
"x\\x.pbl" "";
@end;
@begin Objects
"x\\foo.srd" "x\\x.pbl";
@end;

Obviously, all source files should be moved to these sub folders in
your source control system.

Paul Horan[TeamSybase]

unread,
Jan 17, 2008, 7:43:14 PM1/17/08
to
Source files: There's an option in the workspace SCC properties that is
"Delete PB-generated Object Files". Turn that on so PB cleans up after
itself.

Connect Offline and ImportOnly assume that you've already done a GET of the
latest and greatest source code files (including the PBGs, PBTs, and all the
SR* files.) All that option does is import those into the empty PBLs. So
the technique there is:

Bat file:
call the Surround SCM batch utility to GET the tip revisions into the local
root folder.
call OrcaScript to import those files into PBLs, regen them, and kick out a
compile
erase the source files (if you want to... space is cheap)
move the PBDs and EXEs into some staging area for testers to use.

Orcascript:
SCC connect offline
SCC refresh target IMPORTONLY

Now, if you want your OrcaScript to connect to SCM and get the latest
revisions, you'd use
SCC Connect
SCC refresh target OUTOFDATE EXCLUDE_CHECKOUT

But - I'd never recommend an IMPORTONLY or MIGRATE without first getting
fresh source code files from SCM.

HTH,
Paul Horan[TeamSybase]

"Chris Kean" <christop...@stld-cci.com> wrote in message

news:478fba36$1@forums-1-dub...

0 new messages