1. Tomas Beran
  2. PowerBuilder
  3. Tuesday, 17 May 2022 08:45 AM UTC

Hi

How do you check if the build was successful or not? Does PBAutobuild return value like 0 = OK, other values = the error number?

Is it described somewhere? I haven't found it.

Thank you

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 May 2022 01:32 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Toma,

After PBAutoBuild finishes executing in MS-DOS, you can check whether it succeeds or fails by %ErrorLevel%. %ERRORLEVEL% = 0 means it’s successful.

For example:

Echo off
pbautobuild210.exe /f build.json /l pba_log.log /le pba_err.log
If %ERRORLEVEL% == 0 (
echo Run PBAutoBuild successfully.
) Else (
echo Failed to run PBAutoBuild, ErrorLevel is %ERRORLEVEL%.
)
Pause

 

Regards,
Ken

Comment
  1. Tomas Beran
  2. Wednesday, 18 May 2022 08:45 AM UTC
Hi

I guessed that 0 means OK. Do you know another codes? Do you know if a warning generates also ERRORLEVEL different than 0?

Thank you

  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 18 May 2022 17:41 PM UTC
Hi Ken .. the key issue here is that this return code information is missing from the PB Help. ;-)
  1. Helpful
  1. Ken Guo @Appeon
  2. Thursday, 19 May 2022 01:41 AM UTC
Hi Tomas,

After PBAutobuild finishes, it’s supported to get the result by using ErrorLevel, which only has two values: 0 stands for success, 1 stands for failure.

There is no other error code. If you wants to know about the detailed error, we suggest you can check the PBAutobuild Error Log file.



We will add this to the PB Help document.



Regards,

Ken
  1. Helpful 1
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.