Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

bs2cmd - execute BS2000 command (BS2000)

&pagelevel(4)&pagelevel

The POSIX command bs2cmd executes a BS2000 command.


Syntax


bs2cmd[ -h] cmd

-h

Displays the command syntax and explains the options.

cmd

BS2000 command:
Any BS2000 command in accordance with the BS2000 syntax in SDF format may be specified here (The ISP format is now only supported for compatibility reasons).

Special characters in the BS2000 command (e.g. $, *) must be escaped by a backslash ('\'). Alternatively, the entire cmd string must be enclosed in quotes.

The command name, operands and operand values are converted to uppercase letters. For commands in the ISP format, only the command name is converted to uppercase.

Hint

The bs2cmd command is also supported with rlogin and telnet accesses to POSIX.

SYSFILE environment:

BS2000 commands that need the SYSFILE environment for execution can be currently executed only in the base shell, since the SYSFILE environment is not fully initialized in a subshell.

Unloading the shell:

When bs2cmd is called from the base shell, the unloading of the shell is prevented by specifying a corresponding BS2000 command (e.g. START-PROGRAM or a user-defined command whose CALL procedure terminates the running program). bs2cmd issues a message (SDP0250), and the BS2000 command is not executed. The unloading of the base shell cannot be currently prevented on calling bs2cmd from a subshell.

Example

The following command shows the catalog entries of the SYSRME files on the BS2000 ID $QM212:


/home/user1> bs2cmd 'show-file-attributes $qm212.sysrme.*'

%      15 :1OSN:$QM212.SYSRME.ARCHIVE.090.D

%      15 :1OSN:$QM212.SYSRME.ARCHIVE.090.E
  .

  .

  .
%      12 :1OSN:$QM212.SYSRME.POSIX-BC.070.D

%      12 :1OSN:$QM212.SYSRME.POSIX-BC.070.E

%      18 :1OSN:$QM212.SYSRME.POSIX-BC.080.D
%      18 :1OSN:$QM212.SYSRME.POSIX-BC.080.E

%:1OSN: PUBLIC:    15 FILES RES=      210  FREE=       18  REL=       0 PAGES

%:1OSN: PUB/S2:     2 FILES RES=      123  FREE=        1  REL=       0 PAGES

/home/user1>

See also

bs2cp, bs2file