IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unload JOb details from a particular DD through batch


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 16, 2011 4:25 am
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: 1702
Location: Australia

PostPosted: Mon May 16, 2011 4:40 am
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon May 16, 2011 7:07 am
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon May 16, 2011 10:27 am
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon May 16, 2011 11:09 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 16, 2011 12:19 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 16, 2011 12:24 pm
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

Superior Member


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

PostPosted: Mon May 16, 2011 4:46 pm
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

Superior Member


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

PostPosted: Mon May 16, 2011 4:50 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 16, 2011 5:03 pm
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

Superior Member


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

PostPosted: Mon May 16, 2011 6:16 pm
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

Superior Member


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

PostPosted: Mon May 16, 2011 6:22 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon May 16, 2011 6:30 pm
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

Superior Member


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

PostPosted: Mon May 16, 2011 7:03 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon May 16, 2011 7:17 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top