View previous topic :: View next topic
|
Author |
Message |
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
Hi Frank,
The is the actual input file:
===============DEVELOPMENT.READ.INPUT==RECFM=VB====
This order has been processed and the following terms are applicable to
it.
Collect the order by CARRIER.
Collect on Person.
Auto send and allow Ship Charge.
Please follow up with the source person for your shipment 143246...
For further details contact helpdesk. Thank You .
=============================================
My concern is i need to find the string "143246" in the whole dataset. Thats what i meant by 1
You have correctly got the points 2 and 3.
For the input required to you i'll try to get back asap.
Thanks dude, |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
Hi Frank,
The LRECL of my input file is INPUT LRECL = 2015, BLKSIZE = 23476, TYPE = VB.
The LRECL of my output file is also kept as OUTPUT LRECL = 2015, BLKSIZE = 23476, TYPE = VB.
My sort version is DFSORT REL 14.0...got this fromt the sysout of one of the sort runs as you said. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
With DFSORT R14, you can use this DFSORT/ICETOOL job to do what you want. The step will give you a return code of 0 if the string is found, or a return code of 12 if the string isn't found.
Code: |
//R14 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (VB/2015)
//OUT DD DSN=... output file (VB/2015)
//TOOLIN DD *
* Look for '143245' string.
COPY FROM(IN) TO(OUT) USING(CTL1)
* If string found, set RC=0.
* If string not found, set RC=12.
COUNT FROM(OUT) EMPTY
/*
//CTL1CNTL DD *
OPTION COPY,VLSCMP
INCLUDE COND=(1,2015,SS,EQ,C'143246')
/*
|
The job above would work with z/OS DFSORT V1R5 as well, but with the new release you can actually do this a little more easily by using the new NULLOUT parameter. The step will give you a return code of 0 if the string is found, or a return code of 16 if the string isn't found.
Code: |
//V1R5 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB/2015)
//SORTOUT DD DSN=... output file (VB/2015)
//SYSIN DD *
* Look for '143245' string.
INCLUDE COND=(1,2015,SS,EQ,C'143246')
* If string found, set RC=0.
* If string not found, set RC=16.
OPTION COPY,VLSCMP,NULLOUT=RC16
/*
|
|
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
Hey Frank,
Thanks for the solution once again. I'll try this and get back to you.
Thanks again !
Regards, |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
Hi Frank,
This solution worked fine. Thanks for your help.
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Please start a new Topic for each new question (starting with this one) instead of putting all of your questions in this one Topic. That makes it easier to follow the threads and easier to search them. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Oh, and since you're asking questions about DFSORT, please ask them in the DFSORT Forum (which I moderate) instead of in the JCL Forum. |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
ok no problem,
i'll put up the above query in the dfsort section with a new topic... |
|
Back to top |
|
|
|