Re: IOFWTR SNAP itself


[ Follow Ups ] [ Post Followup ] [ IOF Q&A Message Board ] [ FAQ ]

Posted by Jim Walker on May 13, 2008 at 09:11:01:

In Reply to: IOFWTR SNAP itself posted by Sam Knutson on May 08, 2008 at 12:03:44:

: Can IOFWTR be invoked as the last step of a job without adding a customer written exec to SNAP the contents of all the previously executed job steps?

IOFWTR will not do what you want. IOFWTR copies output groups, not jobs. Only SPUN data sets will have output groups while the job is running, because groups are built after the job completes exexution. But it is a relatively simple task to write a clist to do what you want.

I wrote such a clist for someone years ago, called SNAPME. By default it will generate a DASD DSNAME and snap to the DSNAME. I added the SYSOUT parm. If you specify SYSOUT(x) it will snap to sysout class X instead of snapping to DASD. You may want to modify the clist to specify SMS parms and perhaps do a smarter job of specifying the SPACE parms.

A copy of the clist is below.

Regards,

Jim Walker
IOF Technical Support

/* SNAPME - Snap a copy of the current job */
/* Specify a sysout class to snap to sysout. */
/* Otherwise allocate DASD data set with DSN in the form: */
/* prefix.JOB.jobname.jobid.Dyyddd.HhhMmm */
/* Copyright 2002, 2008 Triangle Systems */

PROC 0 PREFIX(ISIJFW) PRIMARY(100) SECONDARY(10) SYSOUT() TEST
CONTROL END(ENDO)
IF &TEST = TEST THEN CONTROL LIST CONLIST
IOF * CURRENT JOBLIST CLIST /* Current job on job list menu */
1 TSICOPY NAME(JOBNAME JOBID) TO(CLIST) /* Get current jobname jobid*/
SET DATE = D&SUBSTR(1:2,&SYSJDATE)&SUBSTR(4:6,&SYSJDATE)
SET HR = &SUBSTR(1:2,&SYSTIME)
SET MIN = &SUBSTR(4:5,&SYSTIME)
SET TIME =H&HR.M&MIN
SET JOBNAME = &JOBNAME /* Strip blanks */
1 SELECT
EXCL SECTION NE DATASET
TSICOPY NAME(ROWS) TO(CLIST) SECTION(PANEL)
/* Build output DSN and allocate it */
SET OUTDSN = &PREFIX..JOB.&JOBNAME..&JOBID..&DATE..&TIME
IF &SYSOUT = &STR() THEN DO
TSO ALLOC FI(OUTPUT) DA('&OUTDSN') NEW TRACKS +
LRECL(252) RECFM(V B A) BLKSIZE(0) +
SPACE(&PRIMARY &SECONDARY) RELEASE UNIT(3390) VOL(DSK30C)
SET ACC = &LASTCC
IF &ACC NE 0 THEN DO
WRITE Allocate error &ACC
EXIT CODE(16)
ENDO
SD $DDNAME$(OUTPUT) /* Define target snap data set as allocated ds *
ENDO
ELSE DO
SS CLASS(&SYSOUT)
ENDO

1-&ROWS SNAP /* Snap the job */
SNAPCLOS /* Close snap output */
JUMP X /* Exit IOF */
EXIT CODE(0)



Follow Ups:



Post a Followup

Name:

What is the MVS job entry subsystem supported by IOF?
We ask this question to reduce bogus postings to this bulletin board
Answer:

E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ IOF Q&A Message Board ] [ FAQ ]