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

Regarding search and INCLUDE statement


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Mon May 02, 2005 9:50 pm
Reply with quote

Hi Frank,

I have a new query, a bit different, i'll try to explain it to you.

1. I have chained three jobs Job1, Job2 and Job3
Job1 is submitted which at the end if the maxcc of Job1 = 0 will submit Job2 and so on. I have set this up and currently it is working fine.

2. Now, in job1 there is a condition as illustrated below:
-----------------------------------------------------------------------------------
=========JOB1========
job1step1
job1step2
job1step3
i am searching for a string '123456' in a dataset JOB1.OUTPUT at this step.
job1submit
If string is found submit the next job that is Job2.
(this is wrking fine currently..no issue here)
=========JOB2========
job2step1
job2step2
job2step3
i am searching for a string '123456' in a dataset JOB2.OUTPUT at this step.
job2submit
If string is found submit the next job that is Job3.
(this is also wrking fine currently..no issue here)
-------------------------------------------------------------------------------------

The Issue:
1. The string '123456' is actually a transaction number which is processed in this chain of three jobs.
2. This can be any 6 digit number. Every time while running this chain that i have made, i have to enter this string in the INCLUDE statement in ICETOOL used for searching in each job.
Like : open the job JOB1 and give the string in its include statement, open job JOB2 and give the same string in the INCLUDE statement and so on for JOB3 also.

The Question:

Is there anyway i can point the INCLUDE statemnt of next job to the INCLUDE statemnt for the first job?
Like : open the job JOB1 and give the string in its include statement, point the INCLUDE statmnt of job2 to that of job1 so that i dun have to repreatedly enter the same string for job2 and job3 ?

Bottomline: Something like the "referback technique"

Please let me know if the doubt is clear,
Thanks in Advance
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 02, 2005 10:14 pm
Reply with quote

Here are two suggestions:

1) Put the INCLUDE statement in a RECFM=FB/LRECL=80 data set that all three jobs can use.

If all three sets of control statements are identical, you can put them all in the data set. For example:

Put the control statements in FileA, e.g.

Code:

   OPTION COPY
   INCLUDE COND=(...)


Then use FileA as the control statement data set wherever needed, e.g.

//SYSIN DD DSN=... FileA

If all three sets of control statements are not identical, you can just put the INCLUDE statement in FileA and then use it where needed with concatenation, e.g.

Code:

//SYSIN DD *
   OPTION COPY
//  DD DSN=...  FileA (with INCLUDE statement)


2) If the only thing in your control statements that changes is the INCLUDE constant, set it up as a DFSORT Symbol so you can use it wherever it's needed.

Set up FileA as a RECFM=FB/LRECL=80 data set with:

MYCON,'constant'

Then use:

//SYMNAMES DD DSN=... FileA

in each step and an INCLUDE statement like this:

Code:

   INCLUDE COND=(....,EQ,MYCON)
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue May 03, 2005 5:59 pm
Reply with quote

Hi Frank,
I am using the following piece of code for searching a string in the dataset. This piece of code as i previously mentioned is comon in Job2 and Job3:

_________________________________________________________

//*
//SEARCH EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=DEVELOPMENT.OUTPUT.DATA,DISP=SHR
//T1 DD DSN=&&T1,DISP=(NEW,PASS),UNIT=VIO
//TOOLIN DD DATA
COPY FROM(IN) USING(CTL1)
COUNT FROM(T1) EMPTY
/*
//CTL1CNTL DD DATA
INCLUDE COND=(1,140,SS,EQ,C'143250')
OUTFIL FNAMES=T1
/*
//*
_________________________________________________________
Currently this is working fine.

As per your first suggestion how do i modify this code. Wch part shud i include in the dataset to be kept comon for both the jobs?

Please let me know.
Thanks in advance,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue May 03, 2005 9:19 pm
Reply with quote

If all three jobs use the same two control statements for CTL1CNTL, you can create a RECFM=FB/LRECL=80 data set, called MYCTL for example, with:

Code:

  INCLUDE COND=(1,140,SS,EQ,C'143250')
  OUTFIL FNAMES=T1


Then use this in each job:

//CTL1CNTL DD DSN=MYCTL,DISP=SHR

Now you can just change C'143250' in MYCTL to whatever you need when you rerun the jobs.
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Wed May 04, 2005 2:17 pm
Reply with quote

Hi Frank,
As per your suggestion i have created a dataset MYTSO.MYCTL of RECFM=FB/LRECL=80.

=======MYTSO.MYCTL===========
INCLUDE COND=(1,140,SS,EQ,C'143250')
OUTFIL FNAMES=T1
===========================

I used it in the code as follows:
___________________________________
//*
//SEARCH EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=INPUT.DATA,DISP=SHR
//T1 DD DSN=&&T1,DISP=(NEW,PASS),UNIT=VIO
//TOOLIN DD DATA
COPY FROM(IN) USING(CTL1)
COUNT FROM(T1) EMPTY
/*
//CTL1CNTL DD DSN=MYTSO.MYCTL,DISP=SHR
/*
//*
_______________________________________________

But, when i ran the job, this step gave me a return code of 16.
As per my understanding, if the string is not present it shud have given 12, but the string was present in the output dataset.
What can be the reason for 16 return code. Am i missing anything here?

Please let me know.
Thanks in Advance,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed May 04, 2005 8:46 pm
Reply with quote

The return code 16 is accompanied by an error message (ICExxxA) in //DFSMSG that tells you what you did wrong. If you can't figure out what's wrong from the //DFSMSG messages, post them and I'll help you.

Note that if you actually coded the INCLUDE and OUTFIL statements without a leading blank, then that would be the error - you need to include a leading blank for ALL DFSORT statements.
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Fri May 06, 2005 3:03 pm
Reply with quote

Hi Frank,
Yes, you were right ! I had not given the Leading blank in the statements. I corrected it and the job went fine.

Thanks Again !
Regards,
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts first column truncated in search result IBM Tools 13
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top