Salesforce

How to modify the PROBKUP script to accept more than 9 parameter arguments?

« Go Back

Information

 
TitleHow to modify the PROBKUP script to accept more than 9 parameter arguments?
URL Name000057677
Article Number000174737
EnvironmentProduct: OpenEdge
Version: 10.x, 11.x
OS: Windows
Question/Problem Description
How to modify the PROBKUP script to accept more than 9 parameter arguments?

Product limit on the number of parameters that can be passed to the PROBKUP command line is 9.
How to overcome the product limit on the number of parameters that can be passed to the PROBKUP command line (which uses _mprshut for online and _dbutil for offline backups).

Why does probkup fail with error 1403 on valid parameters towards the end of the command line?
Steps to Reproduce
Clarifying Information
Error MessageYou have not supplied a parameter for argument <arg>. (1403)
Defect NumberEnhancement PSC00297359
Enhancement Number
Cause
Resolution
This issue applies to any valid PROBKUP parameters that are used which exceed the 9 parameter limit:
  • When more than 9 parameters are used in the PROBKUP command line, these arguments are ignored.
  • If more than 9 parameters are passed to the PROBKUP command line, where the parameter and value split over the 9th parameter probkup fails with error 1403 on the 9th parameter's value:
You have not supplied a parameter for argument <9th parameter>. (1403).

Modify the PROBKUP script based off the PROUTIL script to accept the required number of parameters.

In the following example, probkup.bat accepts 13 parameters:

 
@echo off
if "%DLC%"==""    set DLC=<full path to your DLC environment here>
type "%DLC%"\version

set p1=%1
set p2=%2
set p3=%3
set p4=%4
set p5=%5
set p6=%6
set p7=%7
set p8=%8
set p9=%9
shift
shift
shift
shift
shift
shift
shift
shift
shift
set p10=%1
set p11=%2
set p12=%3
set p13=%4

#   [large/upper/lower] case "online" is all the same
if /i ""%p1%"" == ""online"" goto Online

:Offline
"%DLC%\bin\_dbutil" probkup %p1% %p2% %p3% %p4% %p5% %p6% %p7% %p8% %p9% %p10% %p11% %p12% %p13% 
GOTO End

:Online
"%DLC%\bin\_mprshut" %p2% -C backup online %p3% %p4% %p5% %p6% %p7% %p8% %p9% %p10% %p11% %p12% %p13% 
GOTO End

:End
Workaround
Workaround 1: Call the executable directly

PROBKUP uses the _mprshut for online and _dbutil executable for offline backups.This parameter limit can be worked around by call the executable directly:
 
Example: ONLINE PROBKUP: 
 
_mprshut <dbname> -C backup online bkupvol\backup.01 enableai enableaiarchiver -aiarcdir <directory> -aiarcinterval <interval> -vs <blocks> -com < backupfiles.dat > backup.log

Example: OFFLINE PROBKUP:
 
_dbutil probkup <dbname> incremental bkupvol\backup.01 -aiarcdir <directory> -aiarcdircreate -vs 1000 -verbose -com -norecover -estimate < backupfiles.dat

Workaround 2: Use a .pf file for parameter arguments 

Run PROBKUP with a .pf file containing all backup PARAMETERS through a .pf file as follows: 
 
$  probkup online <dbname> backup.01 enableai enableaiarchiver -pf backup.pf < backupfiles.dat > backup.log
 
Where there is a Carriage Return after the last line in the .pf, indicated by <CR> do not include it
# backup.pf 
-aiarcdir <directory>
-aiarcinterval <interval>
-bibackup all
-vs <blocks>
-com 
-Bf 512
-Bp 32

 
Notes
Keyword Phrase
Last Modified Date9/11/2020 8:14 AM

Powered by