NewETAPE projectEmuframe Tape Server (ETAPE) project
z/OS
This page was auto-translated from Spanish

IBM Bob Shell on z/OS: install it in USS and a first test

In the previous articles I used IBM Bob on a virtual machine with RHEL: IBM Bob with COBOL and Podman on RHEL and IBM Bob in the pipeline: fix COBOL automatically.

Bob Shell also works on z/OS UNIX System Services (USS). In this article I install it on my z/OS 3.1 (ADCD) on ZD&T and ask it for something that only makes sense on the mainframe: to review PARMLIB and tell me what each member is for.

This is a lab idea: a way to try, in isolation, something that occurred to me. There are probably better or more complete ways to do it. The idea is to see that it works and that everyone adapts it to what they need, always taking into account what the IBM licenses allow.

IBM documentation: Installing and using Bob Shell on Z

Requirements

According to the IBM documentation, Bob Shell on z/OS needs:

  • Node.js 24 or later, from IBM Open Enterprise SDK for Node.js, and npm.
  • A Bob API key: on z/OS you cannot sign in with the IBMid from the browser.
  • An Internet connection to Bob (HTTPS, port 443).
  • 500 MB of disk.
  • A MEMLIMIT of at least 512 MB for each Bob process (1 GB recommended).
  • curl and bash, if you install it with the script.

And Node.js 24 on z/OS needs, according to its own documentation, ICSF started, at least 1 GB free in /tmp and /usr/bin/env to exist.

I check it in USS:

ls -l /usr/bin/env /bin/env
type curl bash
df -k /tmp

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 1

On my z/OS:

  • /usr/bin/env exists: it is a link to /bin/env.
  • bash is there, in /usr/lpp/Rocket/rsusr/ported/bin/bash.
  • curl is not there (FSUM7422 curl is not found), so I cannot use the install script: I install Bob Shell directly with npm.
  • /tmp has about 884 MB free out of 893 MB, less than the 1 GB that Node.js 24 asks for. For temporary files I use another folder with the TMPDIR variable.

And on the console, that ICSF is started:

D A,CSF

ICSF (CSF) is started.

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 2

Node.js: I try with version 22

The Bob Shell documentation asks for Node.js 24 or later. But the npm package (@ibm/bob 2.1.0) declares 22.15 as the minimum, and the install script also checks for 22.15 (on RHEL it showed "minimum 22.15 required"). On my ADCD I have 22.23.4, the one I installed in Update Node.js on z/OS (IBM Open Enterprise SDK for Node.js), so I try with it. It is not the configuration IBM documents: it is a lab test.

. /u/nodeJS/current/.env
node --version
npm --version

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 3

With Node.js loaded, I check the Internet connection with a request to bob.ibm.com. The command does not fit on the command line of the TSO OMVS shell, so I put it in a small script:

oedit /tmp/checkbob.js
require('https').get('https://bob.ibm.com', r => {
  console.log('HTTP', r.statusCode);
  process.exit(0);
}).on('error', e => {
  console.log('ERROR', e.message);
  process.exit(1);
});
node /tmp/checkbob.js

If it shows HTTP and a code (200, 301 or 302), the z/OS reaches bob.ibm.com. If it shows ERROR, it does not.

In my case it shows HTTP 200. The strange characters around the 200 (-[33m and -[39m) are the color codes that Node.js adds to numbers, which the TSO OMVS shell does not interpret.

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 4

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 5

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 6

We confirm that the response is HTTP 200.

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 7

A zFS for Bob Shell

My home folder is in /u, which on the ADCD is a small zFS (ZFS.USERS): it has about 9.5 MB free out of 29 MB. Bob Shell needs about 500 MB, and npm also keeps its cache in the home folder by default (~/.npm). And /tmp has less than the 1 GB that Node.js asks for.

df -k /u/ibmuser

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 8

So I create a zFS just for Bob Shell, as I did with Node.js. It holds the npm packages, their cache, the temporary files and the working folder for the tests with Bob. I generated the job with the zFS Generator:

//ZFSBOB   JOB (ACCT),'CREATE ZFS',CLASS=A,MSGCLASS=X
//* 1. Mount point
//MKDIR    EXEC PGM=BPXBATCH
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*
//STDPARM  DD *
SH mkdir -p /u/bobshell
/*
//* 2. Define the aggregate (ZFS: EA, formatted at mount)
//DEFINE   EXEC PGM=IDCAMS,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  DEFINE CLUSTER (NAME(IBMUSER.BOBSHELL.ZFS) -
         ZFS -
         CYLINDERS(3000 0) -
         SHAREOPTIONS(3))
/*
//* 3. Mount it
//MOUNT    EXEC PGM=IKJEFT01,COND=(0,NE)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD *
  MOUNT FILESYSTEM('IBMUSER.BOBSHELL.ZFS') +
        MOUNTPOINT('/u/bobshell') +
        TYPE(ZFS) MODE(RDWR)
/*

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 9

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 10

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 11

As with the Node.js zFS, this MOUNT does not survive an IPL: to mount it always, you have to add it to the BPXPRMxx member.

I create the folders and tell npm where to install the global packages and where to keep its cache. The temporary files go to /u/bobshell/tmp with the TMPDIR variable, and the npm bin folder goes in the PATH, both in my .profile.

I do it with a job: the first step writes a script to /tmp and the second one runs it with BPXBATCH. The .profile lines are only added if they are not there, so the job can be run again:

//BOBNPM   JOB (ACCT),'SETUP NPM',CLASS=A,MSGCLASS=X
//* 1. Write the setup script to /tmp
//WRITESH  EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1   DD *
. /u/nodeJS/current/.env
mkdir -p /u/bobshell/npm /u/bobshell/npm-cache
mkdir -p /u/bobshell/tmp /u/bobshell/work
df -k /u/bobshell
npm config set prefix /u/bobshell/npm
npm config set cache /u/bobshell/npm-cache
grep -q '/u/nodeJS/current/.env' $HOME/.profile ||
  echo '. /u/nodeJS/current/.env' >> $HOME/.profile
grep -q 'TMPDIR=/u/bobshell/tmp' $HOME/.profile ||
  echo 'export TMPDIR=/u/bobshell/tmp' >> $HOME/.profile
grep -q '/u/bobshell/npm/bin' $HOME/.profile ||
  echo 'export PATH=/u/bobshell/npm/bin:$PATH' >> $HOME/.profile
npm prefix -g
npm config get cache
tail -5 $HOME/.profile
/*
//SYSUT2   DD PATH='/tmp/bobsetup.sh',
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=(SIRUSR,SIWUSR),FILEDATA=TEXT
//* 2. Run it
//RUNSH    EXEC PGM=BPXBATCH,COND=(0,NE)
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*
//STDPARM  DD *
SH /bin/sh /tmp/bobsetup.sh
/*

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 12

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 13

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 14

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 15

Install Bob Shell

As I do not have curl, instead of the script I use the npm command from the Bob Shell documentation, which downloads the package from the npm registry.

I also run it with a job, the same way (a script in /tmp and BPXBATCH). On ZD&T the installation takes a while, so I remove the time and memory limits of the job:

//BOBINST  JOB (ACCT),'INSTALL BOB',CLASS=A,MSGCLASS=X,
//          REGION=0M,MEMLIMIT=NOLIMIT,TIME=1440
//* 1. Write the install script to /tmp
//WRITESH  EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1   DD *
. /u/nodeJS/current/.env
export TMPDIR=/u/bobshell/tmp
export PATH=/u/bobshell/npm/bin:$PATH
REG=https://registry.npmjs.org/
OPTS=--allow-scripts=@officecli/officecli
npm install --registry=$REG $OPTS -g @ibm/bob
echo "npm install return code: $?"
bob --version
echo "bob --version return code: $?"
/*
//SYSUT2   DD PATH='/tmp/bobinstall.sh',
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=(SIRUSR,SIWUSR),FILEDATA=TEXT
//* 2. Run it
//RUNSH    EXEC PGM=BPXBATCH,COND=(0,NE)
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*
//STDPARM  DD *
SH /bin/sh /tmp/bobinstall.sh
/*

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 16

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 17

It ends fine: npm installs Bob in 15 seconds (added 3 packages) and bob --version shows 2.1.0, with Node.js 22.23.4. At the end there are two warnings:

  • Bob warns that on z/OS, without the Node.js --liftoff-only option, it can fail when running WebAssembly. Interactive sessions pass it automatically; for non-interactive ones you have to call node directly with that option.
  • "Cannot open directory /etc/ssl/certs to load OpenSSL certificates".

The warning "Cannot open directory /etc/ssl/certs to load OpenSSL certificates" shows up in the installation and in every Bob run. That folder does not exist on my z/OS, but Bob connects over HTTPS without problems, so it can be ignored.

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 18

The API key

I use the same key I created in the other article. The key is longer than a line of the ISPF editor, so I do not paste it in oedit: I upload by FTP, in ASCII mode, the ~/.bob-api-key file I already had on the RHEL machine, to /u/ibmuser/.bob-api-key.

As the file name starts with a dot, it is a hidden file and WinSCP may not show it. You can show hidden files with Ctrl+Alt+H (or in Options → Preferences → Panels → Show hidden files), or make a temporary copy with another name (cp ~/.bob-api-key ~/bobkey.txt), upload it and delete it afterwards. When uploading it, choose the Text mode in Transfer settings, so that it is converted to EBCDIC.

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 19

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 20

Then I remove the permissions for everyone else:

chmod 600 ~/.bob-api-key
ls -l ~/.bob-api-key

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 21

And I check that Bob answers without a UI, as on RHEL. I do it with a job, calling node with the --liftoff-only option, as the warning asks.

On RHEL I accepted the Bob license in the interactive UI. On z/OS I install it from scratch and test it with a job, without a UI: my first attempt ended with return code 1 and the message "A license agreement is required. Please accept the license terms…". That is why the job has the --accept-license option. Before accepting it, you can check the license with bob --show-license.

//BOBRUN   JOB (ACCT),'BOB RUN TEST',CLASS=A,MSGCLASS=X,
//             REGION=0M,MEMLIMIT=NOLIMIT,TIME=1440
//* 1. Write the test script to /tmp
//WRITESH  EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1   DD *
. /u/nodeJS/current/.env
export TMPDIR=/u/bobshell/tmp
export BOB_API_KEY="$(cat $HOME/.bob-api-key)"
BOBJS=/u/bobshell/npm/lib/node_modules/@ibm/bob/dist/bob.js
PROMPT="Reply only with the word OK"
OPTS="--format json --accept-license"
cd /u/bobshell/work
node --liftoff-only $BOBJS run $OPTS "$PROMPT" </dev/null
echo "bob run return code: $?"
/*
//SYSUT2   DD PATH='/tmp/bobrun.sh',
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=(SIRUSR,SIWUSR),FILEDATA=TEXT
//* 2. Run it
//RUNSH    EXEC PGM=BPXBATCH,COND=(0,NE)
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*
//STDPARM  DD *
SH /bin/sh /tmp/bobrun.sh
/*

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 22

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 23

Bob answers with "status":"success" and the job ends with return code 0: Bob Shell works on z/OS with Node.js 22.23.4.

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 24

Bob reviews PARMLIB

I ask Bob to list the members of the two ADCD PARMLIBs (USER.Z31B.PARMLIB and ADCD.Z31B.PARMLIB) and tell me what each one is for. PROGxx members can define different things (the APF list, the LNKLST, exits…), so I ask it to read those. It only has to read: it does not change anything. To list the members it uses tsocmd, which runs TSO commands from USS. I also do it with a job: the first step writes the instructions to /u/bobshell/work/prompt.txt, the second one writes the script and the third one runs it.

This time I do not use --format json: without that option, Bob writes in the output what it is doing and its answer as text, which reads better in SDSF. I give it the same limits as in the pipeline (--max-cost and --max-turns).

With bob run, Bob runs commands without asking for permission, and in this job it runs as IBMUSER, which is a superuser on the ADCD. On a real system you should use a user with just the permissions it needs, like the one I created for the Python batch scripts (Create a user for Python batch scripts (RACF)).

//BOBPARM  JOB (ACCT),'BOB READS PARMLIB',CLASS=A,MSGCLASS=X,
//             REGION=0M,MEMLIMIT=NOLIMIT,TIME=1440
//* 1. Write the instructions for Bob
//WRITEP   EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1   DD *
List the members of these two PARMLIB libraries with these commands:

tsocmd "LISTDS 'USER.Z31B.PARMLIB' MEMBERS"
tsocmd "LISTDS 'ADCD.Z31B.PARMLIB' MEMBERS"

For each member, say in one line what it is used for, based on its
name prefix (for example IEASYSxx, BPXPRMxx, SMFPRMxx).

PROGxx members can define different things (APF list, LNKLST,
exits...). Read each PROGxx member with a command like this one
and say what it defines:

cat "//'USER.Z31B.PARMLIB(PROG00)'"

Do not change anything. Answer with a table for each library.
/*
//SYSUT2   DD PATH='/u/bobshell/work/prompt.txt',
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=(SIRUSR,SIWUSR),FILEDATA=TEXT
//* 2. Write the script to /tmp
//WRITESH  EXEC PGM=IEBGENER,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1   DD *
. /u/nodeJS/current/.env
export TMPDIR=/u/bobshell/tmp
export BOB_API_KEY="$(cat $HOME/.bob-api-key)"
BOBJS=/u/bobshell/npm/lib/node_modules/@ibm/bob/dist/bob.js
OPTS="--accept-license --max-cost 1 --max-turns 30"
cd /u/bobshell/work
node --liftoff-only $BOBJS run $OPTS "$(cat prompt.txt)" </dev/null
echo "bob run return code: $?"
/*
//SYSUT2   DD PATH='/tmp/bobparm.sh',
//            PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//            PATHMODE=(SIRUSR,SIWUSR),FILEDATA=TEXT
//* 3. Run it
//RUNSH    EXEC PGM=BPXBATCH,COND=(0,NE)
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*
//STDPARM  DD *
SH /bin/sh /tmp/bobparm.sh
/*

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 25

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 26

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 27

Bob lists the members of the two libraries with tsocmd, reads the PROGxx members of USER.Z31B.PARMLIB one by one and, for those in ADCD.Z31B.PARMLIB, writes two for loops by itself that read them all. In total it makes 6 tool calls, takes 1 minute, spends 0.107 Bobcoins and the job ends with return code 0.

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 28

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 29

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 30

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 31

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 32

At the end it returns a table for each library. Bob draws the tables with UTF-8 line characters, which do not exist in EBCDIC, so the table lines do not show in SDSF; the text reads fine.

The PROGxx members, which it does read, it classifies by what they contain: the ones that add libraries to the APF list, the ones that add libraries to the LNKLST, and PROGSY, which defines the SYSLIB. But many other members it explains only by their name, and there it makes mistakes. For example, it says that CONFIG01 is an IEASYSxx override (it is the configuration that is compared with D M=CONFIG) and that LLA is "Link-pack area" (it is Library Lookaside: LLA and LNKLST).

It is what Bob itself warns about when it starts: "Users should independently verify accuracy of AI-generated content". As a first pass it is useful, but it has to be checked: where it reads the content it gets more right than where it guesses from the name.

The result

Bob Shell works on z/OS: installed with npm in its own zFS, with Node.js 22.23.4 (although IBM documents 24) and run with jobs. It can run USS and TSO commands (with tsocmd) and read PARMLIB members, but its answers have to be checked. Reviewing the two PARMLIBs cost 0.107 Bobcoins:

IBM Bob Shell on z/OS: install it in USS and a first test – screenshot 33

© 2026 Emuframe·🍪 This site only uses functional cookies. No tracking or personal data collection.

On this page