z/OS Batch Runtime Planning and User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Program arguments

z/OS Batch Runtime Planning and User's Guide
SA23-1376-00

You can pass program arguments to the PL/I, COBOL or Java™ main application from z/OS Batch Runtime.

For PL/I or COBOL programs, you can pass a single argument in standard format as it is specified on the PARM= keyword of the //EXEC JCL statement. The following statement shows an example:
bcd.applicationArgs.1=This is PARM= main arg to Cobol 
For Java programs, you can pass program arguments as a string array to the Java main method, as shown in the following example; Java main methods accept this as a variable length string array per the usual specified behavior:
bcd.applicationArgs.1=500
bcd.applicationArgs.2=string input 1
bcd.applicationArgs.3=My userid

You do not have to include a single quote (') in the string value you are passing. Also, note that trailing blanks are not supported in the string.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014