1. CJ Lai
  2. PowerServer 2020 or older (Obsolete)
  3. Thursday, 30 April 2020 16:33 PM UTC

A couple of questions that I have encountered during the Deploy and Run in PB 2019 R2 / CloudPro trial

1- I noticed either the Deploy and/or Run process changed the application workspace and target from their original folder to C:\Program Files (x86)\Appeon\PowerServer 2019\Toolkit. Why? How? And, should I work with this new workspace and target? (Although the target contains and points to those PBLs in the original folder)

( I think the workspace and target is what PowerServer defaults to when open those objects in the Analysis Report. I am not sure though)

2- There are some functions and or commands that are not supported in PowerServer but in Powerbuilder such as, 'GOTO', 'DirectoryExists' (please see attached screen shots). What should I do with those 'errors' among other legit ones in PB not not supported in PowerServer?

3- When I Run the project to Web, my app showed up for a split second then disappeared. Instead, the URL bar changed to 'about:blank'  (It went from //localhost/project_name/x64_index to //localhost/project_name/x64_application.htm before it stayed about:blank. Why? Where did it go wrong?

4- Where do I get a 2019 R2/PowerServer compiler supported PFC/PFE set? Most of the errors in the report are from that. I am wondering if what I have isn't what PowerServer likes.

5- Why does PowerServer NOT support Shared variables? All those variables are deemed Have to Modify errors in the report...

 

Thank you for your help

 

CJ

Attachments (1)
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 4 June 2020 09:13 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Instead of DirectoryExists() you can use FileExists(), it also works for directories.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 5 May 2020 17:31 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Dear CJ -

   This was originally meant to replace the entry in the PFC (pfeapsrv.n_cst_filesrvwin32.of_DirectoryExists).

   If you are not using the PFC, or do not wish to overwrite the PFC entry, you can create a new FileServices NVO and add it as a function there.


Later -

Olan

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 30 April 2020 21:41 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

CJ -

1) For GOTO's you can usually recode the event/function to drop the GOTOs.

2_ The DirectoryExists() function needs to be replaced. In stead of using the built-in PowerBuilder version of this function, create your own. This is the answer that was posted a while back from Paul Mele.


From: MELE, PAUL S
Sent: Thursday, January 23, 2003 5:54 AM
Subject: RE: DirectoryExists - non PFC version

If you are not using PFC, this is what we use...

Declare local external
-----------------------------
Function ulong    GetCurrentDirectoryA (ulong buf, ref string wdir) Library "kernel32.dll"
Function boolean SetCurrentDirectoryA (ref string cdir) Library "kernel32.dll"

Function call
-----------------
// **********************************************************
// DirectoryExist
//
// Parms: as_dirname - path to be checked
//
// Returns: True on success, False on failure
// **********************************************************
Boolean lb_rtn=False
String ls_tmp

If IsNull(as_dirname)=False And as_dirname<>"" Then
 If Right(as_dirname,1)="\" Then as_dirname = Left(as_dirname,Len(as_dirname)-1)

 // Attempt to set dir as current
 // Return as failure indicates dir does not exist
 // If it is set, then reset back to current
 ls_tmp = This.GetCurrentDirectory()
 If This.SetCurrentDirectory(as_dirname)=True Then
  lb_rtn=True
  This.SetCurrentDirectory(ls_tmp)
 End If
End If
Return lb_rtn

-----Original Message-----


Good Luck,

 

Olan
 


Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 5 May 2020 19:58 PM UTC
Hi CJ - FWIW: I just use the ChangeDirectory() built-in PB command for the "SetCurrentDirectory" requirement.
  1. Helpful
  1. CJ Lai
  2. Wednesday, 13 May 2020 19:57 PM UTC
Thank you, Chris. That trick got through compilation.

Although that substitution didn't work in my application.

- ChangeDirectory() gets compiled

- ChangeDirectory(local folder path 'c:\temp\' for example) works. It returns 1

- ChangeDirectory(a server path '\\servername\dir1\dir2...\') does NOT work



any insight?

Thanks!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 14 May 2020 18:49 PM UTC
Hi CJ ... Yes unfortunately at this time, UNC paths are not supported. You need to use this technique on "mapped" drives.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 30 April 2020 21:06 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

I don't know what is going on with your items 1 and 3... you may need to open a support ticket for these two issues.

What John and Mike said is exactly right.  So regarding your items 2, 4, and 5, you will need to remediate these unsupported features.  Just to clarify, you can use the PFC framework with PowerServer, which many Appeon customers do, but you will need to put some time to clean it up.

If you don't want to deal with remediating these unsupported features, then you need to wait for PowerServer 2021.  We are going to basically close the gap on unsupported features.  I would recommend to subscribe to our mailing list so you get notified.

Comment
  1. CJ Lai
  2. Tuesday, 19 May 2020 14:57 PM UTC
This is what I found

for item #1, it happens when I right click -> Edit/Edit Source the objects in Analysis Report. It opens in that directory

#3, because I didn't have the Data Sources setup correctly. Transaction objects were not connected to the right data source.



Do we know about the projected release date for PowerServer 2021 where the PFC gaps would be addressed/fixed?
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Tuesday, 19 May 2020 15:21 PM UTC
Our best guess right now is before June 2021.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 30 April 2020 20:47 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 5

Hi, CJ -

As for your question #4, I suspect this is because no one has volunteered to take on the effort and responsibility to review and update the many tens of thousands of lines of code contained in the PFC libraries. The PFC is well into its third decade of existence - it was designed solely for a client/server paradigm, not the web/cloud/mobile environments many projects are being targeted for today. The PFC is open source, so there is no consortium or group that promotes or oversees the development of enhancements. Although Bruce Armstrong graciously administers the PFC repository (Thank you, Bruce!), it is not his responsibility to provide enhancements. Instead, it's everyone's responsibility, and no one's.

I don't know about your situation, but I suspect it is similar to most of us: Our employers and our managers require us to work on their projects and we generally don't get paid to do volunteer work or "pet" projects that we personally would like to do. Even if a company were to take on a review and partial rewrite of the PFC to make it PowerServer compatible, they probably would view that enhancement as a competitive advantage and be against making it available to anyone and everyone. That's just the way it is.

If you're attempting to take a legacy PB application that was built upon the PFC and migrate it into the PowerServer environment and are experiencing significant difficulties, maybe what you're trying to do is not feasible or reasonable for your situation.

Regards / John

Comment
  1. CJ Lai
  2. Wednesday, 3 June 2020 16:13 PM UTC
Thanks to mariano.collado@appeon.com , Armeen Mazda @Appeon and their team's help, I was pointed to PowerServer's Demo Appeon_acf_demo target for the Foundation Class compatible with PowerServer.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 4 June 2020 09:24 AM UTC
Unless Appeon decided to update that ACF demo, the pfc classes used in that project are "ancient". The nice thing about it, is that these ancient pfc classes are very compatible with powerserver, but the bad part is that if you want to migrate an application build with newer pfc classes and replace them with the ACF version, your job is going to be very difficult.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 4 June 2020 17:25 PM UTC
Hi Miguel ... you are 100% correct. Not only are the ACF libraries "ancient", they were also deprecated a long time ago. So CJ (et Al), please do not use the ACF libraries!
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Thursday, 30 April 2020 18:10 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 6

well, #2 and #5 are really the same answer.  PowerServer supports most of powerscript, but not all of it.  you need to review your code and make changes as needed.

Comment
  1. CJ Lai
  2. Monday, 4 May 2020 17:38 PM UTC
Hi Chris

My app is built on 2017 PFC.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 14 May 2020 18:59 PM UTC
The newer the PFC classes, the more unsupported powerbuilder object types you will find. You have to adapt more things in newer pfc's than in older pfc's. At least that was my experience a year ago. Not impossible and I do recommend using the latest version of PFC's, but just more work.

Maybe powerserver has catched up now and there are less unsupported types.
  1. Helpful
  1. CJ Lai
  2. Thursday, 4 June 2020 12:57 PM UTC
I was instructed by Appeon's support to use the foundation class that comes with target 'appeon_acf_demo' in PowerServer Demo. I am in the process of getting it all compiled in CloudPro right now.
  1. Helpful
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.