This is a collection of miscellaneous hints and tips (or Trucs et Astuces as they call them in France) which I have found useful in my work as an MVS - OS/390 - z/OS systems programmer. Maybe you might find something useful here too.
Windows tips have been moved to wintips.htm
//SPSMFXIT JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID //ASMXIT EXEC HLASMCL,REGION=4M,COND.L=(0,NE,C), // PARM.L='LIST,LET,NCAL,XREF,RENT,REUS' //C.SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR // DD DSN=SYS1.MODGEN,DISP=SHR //C.SYSIN DD DSN=SYS1.SAMPLIB(IEEACTRT),DISP=SHR //L.SYSLMOD DD DSN=USER.LINKLIB(IEFACTRT),DISP=SHR,UNIT=,SPACE=
ACTIVE /* ACTIVE SMF RECORDING */
DSNAME(SYS1.MAN1,
SYS1.MAN2,
SYS1.MAN3)
NOPROMPT /* DO NOT PROMPT OPERATOR */
REC(PERM) /* TYPE 17 PERM RECORDS ONLY */
MAXDORM(3000) /* WRITE IDLE BUFFER AFTER 30 MIN */
STATUS(010000) /* WRITE SMF STATS AFTER 1 HOUR */
JWT(2400) /* 522 AFTER 24 HOURS */
SID(&SYSNAME(1:4)) /* USE SYSTEM NAME FROM IEASYM00 */
LISTDSN /* LIST DATA SET STATUS AT IPL */
SYS(TYPE(14:19,30,62:69),NOEXITS,NOINTERVAL,NODETAIL)
/* WRITE ONLY DATA MANAGEMENT RECORDS, TAKE NO EXITS. */
/* NOTE: JES EXITS CONTROLED BY JES , THERE IS NO */
/* DEFAULT INTERVAL RECORDS WRITTEN AND ONLY SUMMARY T32 */
/* RECORDS AS A DEFAULT FOR TSO. */
SUBSYS(JES2,EXITS(IEFACTRT))
/* WRITE RECORDS ACCORDING TO SYS VALUE, TAKE ONLY IEFACTRT EXIT. */
/* USE ALL OTHER SYS PARMETERS AS A DEFAULT. */
T SMF=00
F LLA,REFRESH SETPROG EXIT,DELETE,EXITNAME=SYSJES2.IEFACTRT,MODNAME=IEFACTRT SETPROG EXIT,ADD,EX=SYSJES2.IEFACTRT,MOD=IEFACTRT,DSN=USER.LINKLIB
What to check if it does not work:
IEE252I MEMBER SMFPRM00 FOUND IN USER.PARMLIB
SETPROG APF,ADD,DSN=USER.LOADLIB,VOL=OS39M1 SETPROG LNKLST,DEFINE,NAME=LNKLST01,COPYFROM=LNKLST00 SETPROG LNKLST,ADD,NAME=LNKLST01,DSN=USER.LOADLIB,VOL=OS39M1 SETPROG LNKLST,ACTIVATE,NAME=LNKLST01 D PROG,APF D PROG,LNKLST
SETPROG LNKLST,UNALLOCATE SETPROG LNKLST,ALLOCATE
REFORMAT UNIT(xxxx) VERIFY(serial) EXTVTOC(new size)
REFORMAT UNIT(xxxx) VERIFY(serial) NEWVTOC(cc,hh,n)
Thanks to Andrew B. Longtin for this tip
TCPCONFIG RESTRICTLOWPORTS UDPCONFIG RESTRICTLOWPORTSIf these statements are specified, then the job must either be:
A PORT or PORTRANGE statement with the optional keyword SAF
followed by a 1-8 character name can be used to control access
to the port using the RACF.
Example: PORT 80 TCP * SAF HTTPSERV (where "*" means "any jobname").
You need to define a RACF resource in the class SERVAUTH with
the following name:
EZB.PORTACCESS.sysname.tcpname.safname
where:
locsite fwf
Here are the steps needed to make the IP PrintWay component of the OS/390 Print Server operational. The Print Server exists in OS/390 versions V2R5 through V2R7. IP PrintWay was previously packaged with the NetSpool element of OS/390 V1R3 and V2R4, and prior to that it was a feature of PSF/MVS. The procedure is considerably more complex from OS/390 V2R8 onwards, when IP PrintWay became part of the Infoprint Server product. The printer definitions are no longer contained in the ROUTING and OPTIONS datasets, instead IP PrintWay uses the definitions managed by the Printer Inventory Manager (AOP), an OMVS application which has to be configured and started under the Unix System Services component of z/OS. Which does complicate things somewhat. For OS/390 V2R8 through V2R10 and z/OS, you may find it easier to use the more basic Network Print Facility (NPF) instead. NPF is a separately orderable feature of the Communications Server component of OS/390 and z/OS.
PPT PGMNAME(ANFFIEP) KEY(1) SYST NOSWAP NOPREF NODSI
Use the T SCH=xx command to activate the new SCHEDxx member.
FSS(PRINTWAY) PROC=ANFWPROC,HASPFSSM=HASPFSSM,AUTOSTOP=YES
PRT(1) FSS=PRINTWAY,MODE=FSS,CLASS=P,PRESELCT=YES,
START=YES,SEP=NO,TRKCELL=YES,WS=(Q)
Use the following commands to add the definitions dynamically:
SETROPTS GENERIC(STARTED)
AU ANFWPROC DFLTGRP(ANF) NAME('IP PRINTWAY') NOPASSWORD -
OMVS(HOME(/) PROGRAM(/bin/logout) UID(636))
ALG ANF OMVS(GID(636))
PE 'ANF.*' ID(ANF) ACC(UPDATE)
RDEFINE STARTED ANFWPROC.* STDATA(USER(ANFWPROC))
SETROPTS REFRESH RACLIST(STARTED)
EDIT ---------------------- IP PrintWay Routing Entry ----------------------
COMMAND ===>
USERID - ROLBOLA
DEST ===> LOCAL CLASS ===> P FORMS ===> STD DATE - 04/10/08
TIME - 14:05
Retry : Time ===> 0000:01:00 (HHHH:MM:SS)
: Limit ===> 3 (0-32767)
Retain Time : Success ===> 0000:00:00 (HHHH:MM:SS)
: Failure ===> FOREVER (HHHH:MM:SS)
Port Number ===> (100-65535)
Print Queue Name ===> lp
Host Name/IP Address ===> 192.168.0.5
Options Name ===> BARLINE
NetSpool Printer Name ===>
NetSpool LU Class ===>
NetSpool Default Page Format Entry ===>
NetSpool End-of-File Rules Entry ===>
Notes:
EDIT ---------------------- IP PrintWay Options Entry ----------------------
COMMAND ===>
USERID - ROLBOLA
Options Name ===> BARLINE DATE - 03/01/20
TIME - 10:45
LPR Options ===> delff leading noh linecount 60 lineterm 0d25 max 250000
Exits
Record ===>
Begin Data Set ===>
End Data Set ===>
NetSpool Print Parameters ===>
Advanced
Transmission Group ===> 1 1. Job
Concatenate
2. Data set
Printer Setup Parameters ===>
<ESC>E<ESC>(s0p0T<ESC>&k4S<ESC>&l26a1o1l6c2e62F<ESC>&a3L<ESC>&f2y0X<ESC>*
r0F<ESC>*v0O<ESC>&a180H<ESC>*c7920h270v10g2P<ESC>&a+540V<ESC>&f1x10X<ESC>
&f1y0x0S<ESC>&f2y3x3x3x3x3x3x3x3x3x3X<ESC>&f1s1x10x4X
Explanation of setup string:
<ESC>E Reset
<ESC>(s0p Fixed width character spacing
0T Lineprinter font
<ESC>&k4S Elite (12cpi)
<ESC>&l26a A4 paper size
1o Landscape
1l Enable perforation skip
6c 8lpi
2e Top margin 2 lines
62F Page length 62 lines
<ESC>&a3L Left margin 3 columns
The following macro draws one horizontal stripe 3 lines deep
<ESC>&f2y Macro ID 2
0X Start macro definition
<ESC>*r0F Rotate image
<ESC>*v0O Pattern transparent
<ESC>&a180H Indent 0.25"
<ESC>*c7920h Rectangle width 11"
270v Rectangle height 0.375"
10g Fill 10% grey
2P Shaded fill
<ESC>&a+540V Move cursor down 0.75"
<ESC>&f1x Stop macro definition
10X Make macro permanent
The following macro defines an overlay of 10 horizontal stripes
<ESC>&f1y Macro ID 1
0x Start macro definition
0S Save cursor
<ESC>&f2y Macro ID 2
3x3x3x3x3x3x3x3x3x3X Call macro 10 times
<ESC>&f1s Restore cursor
1x Stop macro definition
10x Make macro permanent
4X Enable overlay
EZAPPFL TYPE=INITIAL
EZAPPFL TYPE=FINAL
END
as all the other entries can be added later via ISPF panels.
PPT PGMNAME(EZAPPFS) KEY(1) NOSWAP
PPT PGMNAME(EZAPPAAA) NOSWAP
Use the T SCH=xx command to activate the new SCHEDxx member
if you needed to change it.
SETROPTS GENERIC(STARTED)
AU NPFSTC DFLTGRP(OMVSGRP) NAME('NETWORK PRINT STC') NOPASSWORD -
OMVS(HOME(/) PROGRAM(/bin/logout) UID(637))
AD 'TCPIP.NPF.*' OWNER(SYS1) UACC(READ) GENERIC
PE 'TCPIP.NPF.*' RESET
PE 'TCPIP.NPF.*' ID(SYS1) ACCESS(ALTER)
PE 'TCPIP.NPF.*' ID(NPFSTC) ACCESS(ALTER)
RDEFINE STARTED NPFWTR.* STDATA(USER(NPFSTC))
RDEFINE STARTED NPFQMGR.* STDATA(USER(NPFSTC))
SETROPTS REFRESH RACLIST(STARTED)
SETROPTS GENERIC(SERVAUTH) CLASSACT(SERVAUTH) RACLIST(SERVAUTH)
RDEFINE SERVAUTH EZB.PORTACCESS.*.TCPIP.LPR UACC(NONE)
PE EZB.PORTACCESS.*.TCPIP.LPR CL(SERVAUTH) RESET
PE EZB.PORTACCESS.*.TCPIP.LPR CL(SERVAUTH) -
ID(NPFSTC) ACCESS(READ)
SETROPTS REFRESH RACLIST(SERVAUTH)
and add the following statement to USER.TCPPARMS(PROFILE):
PORTRANGE 721 12 TCP * SAF LPR ; LPD requester
You can dynamically activate the PORTRANGE statement by
placing it in a member by itself and entering the MVS
console command:
v tcpip,,o,user.tcpparms(lprports)
FSS(NPF) PROC=NPFWTR,HASPFSSM=HASPFSSM,AUTOSTOP=YES
PRT(1) FSS=NPF,MODE=FSS,CLASS=P,PRESELCT=YES,
START=YES,SEP=NO,TRKCELL=YES,WS=(Q)
Use the following commands to add the definitions dynamically:
EDIT -------------------------- NPF Options Record -------------------------
COMMAND ===>
OPTIONS NAME ====> BARLINE
INPUT RECORD EXIT ====> NPFXBARL
LPR OPTIONS ====> NOH LINECOUNT 60
Unlike IP PrintWay, you cannot specify PCL setup strings in the OPTIONS
record. Instead, an Input Record Exit NPFXBARL is specified.
This exit contains hardcoded PCL setup strings equivalent to those
used in the IP PrintWay example above.
EDIT -------------------------- NPF Routing Record -------------------------
COMMAND ===>
MAJOR NAME ===> LOCAL MINOR NAME ===> PSTD
LUCLASS ===>
NO OF DEST ===> 1
RETAIN TIME(S) ===> 0000000 RETAIN TIME(U) ===> 3662359
RETRY INTERVAL ===> 0000030 RETRY LIMIT ===> 32767
DEF PAGE FORMAT ===> EOFILE NAME ===>
OPTIONS NAME ===> BARLINE ROUTING EXIT ===>
HOST NAME/IP ADDR ===> 192.168.0.5
PRINTER NAME ===> lp
Notes:
Last updated 08 Dec 2020