Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Unload JOb details from a particular DD through batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Mon May 16, 2011 4:08 am    Post subject: Unload JOb details from a particular DD through batch
Reply with quote

hi All,
Is it possible for me to unload the specific DD details for a job.

Say for example, I have a job like:

Code:
//STEP01 EXEC PGM=SYNCTOOL             
//DFSMSG   DD SYSOUT=*               
//TOOLMSG  DD SYSOUT=*               
//SYSOUT   DD SYSOUT=*               
//SYSPRINT DD SYSOUT=*               
//IN1 DD DISP=SHR,DSN=ABCD.ABC.TEST   
//IN2 DD DISP=SHR,DSN=KLMN.KLM.TEST   
//TOOLIN DD *                         
 COUNT FROM(IN1)                     
 COUNT FROM(IN2)                     
/*


After I run the job, I get the following DDs:

DDNAME StepName
JESMSGLG JES2
JESJCL JES2
JESYSMSG JES2
DFSMSG STEP01
TOOLMSG STEP01

Can I unload TOOLMSG DD contents in batch without using the XDC command manually.

Please guide.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon May 16, 2011 4:25 am    Post subject: Reply to: Unload JOb details from a particular DD through ba
Reply with quote

Hi kitchu84,

When you say ICETOOL, what is the message prefix for the messages it creates? Are they WER....?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon May 16, 2011 4:40 am    Post subject:
Reply with quote

Hi kitchu84,


Code:
Is it possible for me to unload the specific DD details for a job.

I'm not sure I fully understand your question, but as you mention XDC, I'm assuming you want the output from TOOLMSG written to a dataset, then the answer is YES.

Just write the output to a dataset instead of writing it to SYSOUT.

Gerry
Back to top
View user's profile Send private message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Mon May 16, 2011 4:52 am    Post subject:
Reply with quote

Hi Bill,

This is the TOOLMSG details :

SYT000I SYNCTOOL RELEASE 1.6.0 - COPYRIGHT 2007 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED

COUNT FROM(IN1)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0001"
SYT031I NUMBER OF RECORDS PROCESSED: 000000000000006
SYT030I OPERATION COMPLETED WITH RETURN CODE 0

COUNT FROM(IN2)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0002"
SYT031I NUMBER OF RECORDS PROCESSED: 000000000000001
SYT030I OPERATION COMPLETED WITH RETURN CODE 0

SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 0

Hi gcicchet,

I do not want to write the messages to Dataset but I just want to write the messages to SYSOUT ,
Is there a way that we can unload the details in the TOOLMSG DD using a JOB through batch.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7906
Location: Bellevue, IA

PostPosted: Mon May 16, 2011 7:07 am    Post subject:
Reply with quote

Quote:
I do not want to write the messages to Dataset but I just want to write the messages to SYSOUT ,
Is there a way that we can unload the details in the TOOLMSG DD using a JOB through batch.
The recommended way to do this is to write the messages to a dataset, then copy the dataset to spool (if needed). Once a job has executed, it is not an easy thing to use a batch job to manipulate the spool output.
Back to top
View user's profile Send private message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Mon May 16, 2011 7:52 am    Post subject:
Reply with quote

hi Robert ,

Actually I am trying out various possible ways to achive my requirement.
i.e to get file names and corresponding file counts of jobs.

One way is to do a SAR unload and get all the file names and then create dynamic jcls to get record count of each of the files.

Another way is have the jobs to display the record counts in spool(However, this will need change to many jobs icon_sad.gif ). I need to understand feasibility of this option.
i.e when we do a SAR unload - these counts appear and then we reformat the details in the required way for our use.

I am using SARBCH utility to unload the JESYSMSG to get the filenames.
However, this unloads only the JESYSMSG.

PS0100 EXEC PGM=SARBCH,PARM='SYS3B.SAR'
SYSPRINT DD SYSOUT=*
SYSOUT DD SYSOUT=*
OUTPUT1 DD DSN=unload output filename, DISP=MOD
SYSIN DD *
/PRINT DDNAME=OUTPUT1 ID=jobname GEN=1234 SEQ=1 PAGE=3

If I try to display the counts in the job using SYNCTOOL, then the counts will be displayed in TOOLMSG DD . In order to get the file counts, need to extract the details of TOOLMSG DD. Please suggest me,
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 16, 2011 10:27 am    Post subject: Reply to: Unload JOb details from a particular DD through ba
Reply with quote

Quote:
In order to get the file counts, need to extract the details of TOOLMSG DD. Please suggest me,
it has already been suggested ...
instead of using
Code:
//toolmsg dd sysout=<somesysoutclass>
use
Code:
//toolmsg dd dsn=<datasetname>,<other approprite parameters>
but You complained that the solution does not suit You

what else do You want from us, You are wasting everybody' s time
by asking the same question over and over and refusing to accept the replies You get
icon_evil.gif
Back to top
View user's profile Send private message
kitchu84

New User


Joined: 02 Dec 2006
Posts: 33
Location: chennai

PostPosted: Mon May 16, 2011 10:41 am    Post subject:
Reply with quote

hey enrico,

My apologies. However, My requirement is not to print in the dataset.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 16, 2011 11:09 am    Post subject: Reply to: Unload JOb details from a particular DD through ba
Reply with quote

Quote:
My requirement is not to print in the dataset.

learn how to express clearly Your requirement !

XDC does exactly that... take something that is stored in the spool and write it to a dataset !

so using
Code:
//toolmsg dd dsn=<datasetname>,<other approprite parameters>
satisfies your badly expressed requirement

and if You have to process the counts to make them available <online> You do not have any other way

but we are at loss if You are not able to express things clearly
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon May 16, 2011 12:19 pm    Post subject:
Reply with quote

kitchu84 wrote:

[...]
SYT000I SYNCTOOL RELEASE 1.6.0 - COPYRIGHT 2007 SYNCSORT INC.
[...]


Hi kitchu84,

Just wanted to check, SYNCTOOL or ICETOOL.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon May 16, 2011 12:24 pm    Post subject:
Reply with quote

kitchu84 wrote:

[...]
Another way is have the jobs to display the record counts in spool(However, this will need change to many jobs icon_sad.gif ). I need to understand feasibility of this option.
i.e when we do a SAR unload - these counts appear and then we reformat the details in the required way for our use.
[...]


Hi kitchu84,

Now here, are you talking of doing one of your "count" sorts at the back-end of each job?

Because if you are talking of changing the programs to "display" the counts, that would be silly. They would have no direct need to "display" but could "write to a file", which you can then use...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 16, 2011 4:46 pm    Post subject: Reply to: Unload JOb details from a particular DD through ba
Reply with quote

1. Use what Enrico has suggested.
2. Add a step at the end of the job. Invoke batch SDSF, read the outputs and write the to datasets using SDSF commands from batch.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 16, 2011 4:50 pm    Post subject:
Reply with quote

Bill Woodger wrote:
kitchu84 wrote:

[...]
SYT000I SYNCTOOL RELEASE 1.6.0 - COPYRIGHT 2007 SYNCSORT INC.
[...]


Hi kitchu84,

Just wanted to check, SYNCTOOL or ICETOOL.
Possibly, I misunderstood,however, ICETOOL is aliased to SYNCTOOL on Sync-Sort sites. If you code PGM=ICETOOL in your job, SYNCTOOL will be invoked under the covers and from the messages, OP is at a shop using SyncSort - so s/he is using SYNCTOOL.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon May 16, 2011 5:03 pm    Post subject: Reply to: Unload JOb details from a particular DD through ba
Reply with quote

I just wanted to check because TS had previously been asking about DFSORT, got a solution, didn't work because using SYNCSORT.

I had read previously about the aliasing of SYNCTOOL to ICETOOL, so was guessing at that, just wanted to be sure. Didn't know the aliasing was so common.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 16, 2011 6:16 pm    Post subject: Re: Reply to: Unload JOb details from a particular DD throug
Reply with quote

Quote:
[quote="Bill Woodger"]I just wanted to check because TS had previously been asking about DFSORT, got a solution, didn't work because using SYNCSORT.
The mis-understanding between DFSort and SyncSort (for that per se, among Sort products) is pretty common on this very board just like the difference between Genereations and versions when talking about GDGs...icon_smile.gif

Quote:
I had read previously about the aliasing of SYNCTOOL to ICETOOL, so was guessing at that, just wanted to be sure. Didn't know the aliasing was so common.
I've not worked on many shops, however, all the shops I had been to used this way of aliasing.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 16, 2011 6:22 pm    Post subject:
Reply with quote

kitchu84 - as I said, using SDSF in batch would do the job and If SDSF is can be your choice, try this :
Code:
//BSDSF  EXEC PGM=SDSF                                       
//ISFOUT   DD SYSOUT=*                                       
//SYSUDUMP DD SYSOUT=*                                       
//SYSPRINT DD SYSOUT=*                                       
//SYSTSPRT DD SYSOUT=*                                       
//SYSOUT   DD SYSOUT=*                                       
//ISFIN    DD *                                               
ST                                                           
FILTER JOBID EQ JOB05433                                     
F myjobnm                                                   
++?                                                         
FIND 'myjobdd'                                                 
++S                                                         
PRINT ODSN 'myracfid.SDSF' * OLD                             
PRINT 1 9999                                                 
PRINT CLOSE                                                 
END                                                         
EXIT                                                         
/*   
in this you need to replace the symbolics (myjobdd, myracfid etc) with appropriate values.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 16, 2011 6:30 pm    Post subject: Reply to: Unload JOb details from a particular DD through ba
Reply with quote

time to update the topics not eligible for discussion with a new item
how to count records in a dataset

and seeing the horrible waste of resource also time time to lock the topics from the TS

they are getting nowhere icon_evil.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 16, 2011 7:03 pm    Post subject: Re: Reply to: Unload JOb details from a particular DD throug
Reply with quote

enrico-sorichetti wrote:
time to update the topics not eligible for discussion with a new item
how to count records in a dataset
yup, agreed..icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 16, 2011 7:17 pm    Post subject: Reply to: Unload JOb details from a particular DD through ba
Reply with quote

since I am in a very good mood today I just run a quick and dirty test



Code:
000001 //ENRICO1  JOB NOTIFY=&SYSUID,
000002 //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
000003 //*
000004 //S01     EXEC PGM=ICETOOL
000005 //TOOLMSG   DD DISP=(NEW,PASS),
000006 //             DCB=(RECFM=FBA,LRECL=121),
000007 //             UNIT=SYSDA,SPACE=(CYL,(1,1)),
000008 //             DSN=&&TOOLMSG
000009 //DFSMSG    DD SYSOUT=*
000010 //IN        DD *
000011 REC1
000012 REC2
000013 //TOOLIN    DD *
000014   COUNT  FROM(IN)
000015 //*
000016 //S02     EXEC PGM=SORT
000017 //SYSOUT    DD SYSOUT=*
000018 //SORTIN    DD DISP=(OLD,PASS),
000019 //             DSN=&&TOOLMSG
000020 //SORTOUT1  DD SYSOUT=*,
000021 //             DCB=(RECFM=FBA,LRECL=121)
000022 //SORTOUT2  DD SYSOUT=*,
000023 //             DCB=(RECFM=FBA,LRECL=121)
000024 //SYSIN     DD *
000025   SORT FIELDS=COPY
000026   OUTFIL FNAMES=SORTOUT1
000027   OUTFIL FNAMES=SORTOUT2,
000028          INCLUDE=(1,120,SS,EQ,C'ICE628I')
000029 //*


the job has two steps

the first one counts and stores the TOOLMSG into temporary dataset

the second one
prints the toolmsg to sortout1
cleans the toolmsg from the unwanted lines and writes it to sortout2

in my example it just a sysout dataset,
if routed to a disp=mod dataset will accumulate all the needed data

tested also counting 3 and more datasets

the job is written for dfsort, it should not be difficult to modify the include
for syncsort and friends messages
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us