Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

JCL - command


The - command subtracts an integer from the current parameter in the active input buffer. It takes the general form: 


Where n is the integer to be subtracted.


If the number of characters within a parameter decreases with a - command, the result is prefixed with zeros to maintain the same number of characters as the original value. Parameters within the input buffer can be preceded by a minus sign. If the buffer pointer is at the end of the buffer, a new parameter will be created. If the referenced parameter is non-numeric, a zero is used.


Command PIB Before PIB After 

-300 AAA^345^666 AAA^045^666
a a


Command PIB Before PIB After

-20 AAA^ABC^666 AAA^-20^666
a a


Command PIB Before PIB After

-50 AAA^-50^666 AAA^-100^666
a a

001 PQN
002 OEnter a number+
003 S5
004 IBP
005 +7
006 T %5
007 -3
008 T %5
009 RTN

This example receives input from the terminal and places it in the 5th parameter of the primary input buffer. It adds 7 to the value stored in the 5th parameter and displays the result. It then subtracts 3 from the result and displays the new value.

Back to JCL Commands

Was this article helpful?