Home avatar

Jeffrey Smith

Character Encoding - Chtag

Character Encoding for USS

I recently installed IBM Z Open Automation Utilities and Python on z/OS and learned a new command I haven’t or needed to use before.

The chtag command for character encoding for EBCDIC.

After editing some Helloworld.py file using vi editor I recevied the follow error when I try to run the python code.

/home/#>python hello.py
SyntaxError: Non-UTF-8 code starting with '\x97' 

I needed to change the codeset to IBM-1047 for python to run correctly on USS z/OS.

Checking BPXPRM Syntax

Syntax check command SETOMVS

A handy operator command to check syntax to a BPXPRMxx parm member.

After making some mount point changes recenly I issused the command

SETOMVS SYNTAXCHECK=(P3)

Where P3 is the member in SYS1.PARMLIB that was changed (i.e BPXPRMP3)

IBM link BPXPRMxx syntax checking

Another useful command

D OMVS,MF

Will display information about the last 10 or less mount or move failures

IBM link Displaying z/OS UNIX Status

Find Picture String

Character Encoding for USS

A nice option to the find command that comes in handy is the picture string. I like to use it to find error messages in logs for my normal daily health checks.

There are several characters types to choose from.

While in the SYSLOG or any output you can enter these command examples to find errors.

Example: Go into the SYSLOG and max to bottom of log

ZFS Increasing Size

Character Encoding for USS

Needed to increase the size of a zFS mounted dataset the other day. I will just provide the link to IBM website for the details but instead of duplicating everthing here, but I wasn’t aware this could be done with the pax command instead of the DFSMS REPRO command.

Snippet example from the IBM site

//SYSTSIN  DD  *
OSHELL /usr/sbin/mount -t ZFS -f PLEX.OLD.AGGR002.LDS0002           +
 /service2                                                        ; +
  /usr/sbin/mount -t ZFS -f PLEX.NEW.AGGR002.LDS0002 /service3    ; +
  cd /service2                                                    ; +
  pax -rwvCMX -p eW . /service3                                   ;
/*

IBM link LARGER dataset

OMVS Encoding

OMVS encoding characters

This character brackets [ ] and others that don’t convert to a readable form was driving me crazy.

enter this command when starting a USS session: omvs convert((BPXFX111))

Example, in man pages converts this line:

pax Ý-cdEnvz¨Ý-H|-L¨Ý-f archive¨ Ý-o type¨ Ý-s substitute¨ … Ýpattern …¨

to this line:

pax [-cdEnvz][-H|-L][-f archive] [-o type] [-s substitute] … [pattern …]

much easier to read. 👍

IBM Link OMVS command