I can only echo Shane's reply. I don't know why you are messing around with
external utilities when SDSF Rexx provides you with the function you are after.
Why re-invent the wheel?
Below is a snippet of Rexx invoking SDSF functions to write held sysout to a
PDS:
/******************************************/
/* Turn on SDSF functions, set desired */
/* job list via PREFIX command, specify */
/* print output dataset (for XDC action */
/* character and invoke H (held output) */
/* panel. */
/******************************************/
blah = ISFCALLS('ON')
ISFPREFIX = "ANT*"
ISFOWNER = "ANT"
ISFPRTDSNAME = "ANT.TEMP.SDSFPDS"
ISFPRTDISP = "NEW"
ISFPRTSPACETYPE = "CYLS"
ISFPRTPRIMARY = 5
ISFPRTSECONDARY = 1
ISFPRTBLKSIZE = 27920
ISFPRTDIRBLKS = 10
ADDRESS SDSF "ISFEXEC H"
last_RC = rc
CALL Check_RC
/******************************************/
/* Loop through displayed jobs, writing */
/* each to a PDS member. */
/******************************************/
total_rows = ISFROWS
first_mbr = "Y"
IF total_rows = 0 THEN
DO
SAY 'No jobs found with prefix 'ISFPREFIX', owner 'ISFOWNER'.'
SAY 'Dataset 'ISFPRTDSNAME' not created, no jobs to output.'
END
ELSE
DO i = 1 TO total_rows
ISFPRTMEMBER = JNAME.i
ADDRESS SDSF "ISFACT H TOKEN('"TOKEN.i"') PARM(NP XDC)"
last_RC =rc
CALL Check_RC
IF first_mbr = "Y" THEN
DO
first_mbr = "N"
ISFPRTDISP = "SHR"
END
END
Of course, non-unique job-names would mean any member would contain the last
job with that job-name written to the PDS. I'd suggest writing to a
pre-allocated z/UNIX file (ISFPRTDDNAME) where file-names could be a
concatenation of job-name and job-number, and use the XFC command instead of
XDC. See snippet below:
/******************************************/
/* Turn on SDSF functions, set desired */
/* job list via PREFIX command, specify */
/* print DDNAME (for XFC action char */
/* and invoke H (held output) panel. */
/******************************************/
blah = ISFCALLS('ON')
ISFPREFIX = "ANT*"
ISFOWNER = "ANT"
ISFPRTDDNAME = "ANTSDSF"
ADDRESS SDSF "ISFEXEC H"
last_RC =rc
CALL Check_SDSF_RC
/******************************************/
/* Loop through displayed jobs, writing */
/* each to a z/UNIX file. */
/******************************************/
total_rows = ISFROWS
unix_dir = "/u/ant/"
ADDRESS TSO "FREE F("ISFPRTDDNAME")"
IF total_rows = 0 THEN
DO
SAY 'No jobs found with prefix 'ISFPREFIX', owner 'ISFOWNER'.'
SAY 'No files created in directory 'unix_dir'.'
END
ELSE
DO i = 1 TO total_rows
file_name = unix_dir||JNAME.i||"_"||JNUM.i
ADDRESS TSO "ALLOC F("ISFPRTDDNAME") PATH('"file_name"') ",
"PATHDISP(KEEP,KEEP) PATHOPTS(OWRONLY,OCREAT) ",
"PATHMODE(SIRWXU)"
Last_RC = rc
CALL CHECK_TSO_RC
IF Last_RC <> 0 THEN
LEAVE
ADDRESS SDSF "ISFACT H TOKEN('"TOKEN.i"') PARM(NP XFC)"
last_RC =rc
CALL Check_SDSF_RC
ADDRESS TSO "FREE F("ISFPRTDDNAME")"
END
Ant.
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of saurabh khandelwal
Sent: Friday, 1 March 2013 1:05 PM
To: [email protected]
Subject: Re: SDSF Rexx Issue - to copy SYSOUT into PDS
Hello Herman,
I have check this Mark's utility earlier, but this
doesn't suit to my requirement because my target is to put Job's output in
a single PDS with different members( name can be Job id or Job name). This
will be useful for us, while we are installing any product or performing
set of similar task.
But if I use, PS file, then for every job I will have one dedicated dataset
and it will be painful if I have 100+ jobs.
Regards
Saurabh
On Thu, Feb 28, 2013 at 6:18 PM, Stocker, Herman <
[email protected]> wrote:
> You may want to take a look at Mark's SDSF@DR program. It sounds like
> what the OP wanted to do.
>
> Mark's page:
> http://www.mzelden.com/mvsutil.html
>
>
> Regards,
> Herman Stocker
>
> It is impossible to make anything foolproof, because fools are so
> ingenious.
> -- Robert Heinlein
>
> The sender believes that this E-mail and any attachments were free of any
> virus, worm, Trojan horse, and/or malicious code when sent. This message
> and
> its attachments could have been infected during transmission. By reading
> the
> message and opening any attachments, the recipient accepts full
> responsibility for taking protective and remedial action about viruses and
> other defects. The sender's employer is not liable for any loss or damage
> arising in any way from this message or its attachments.
>
> ---
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
--
Thanks & Regards
Saurabh Khandelwal
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN