Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DFSORT/ICETOOL :: RE: How to use 2 input files in control control card

$
0
0
Author: Abid Hasan
Subject: Re: Reply to: How to use 2 input files in control control card
Posted: Thu Oct 13, 2016 8:32 pm (GMT 5.5)

Hello,

Gunapala CN wrote:
...
Note : i know this scenarios we can handle it in Cobol but we would like try wthr its possible do it with complete JCL/SORT CARDS help. Also with help of RC(return codes , explicit SET in previous step based on condition) we can achieve. we are trying out this.


Not sure if this is an assignment or an actual PRODuction scenario, if it is, then whoever thought of an all *SORT solution is off their pills.

Fwiw, because you haven't defined any specific rules for this task- well, here goes nothing:

a. Have a simple SORT FIELDS=COPY for FILE1 (and it is dataset, not file), have 3 OUTFIL statements for your OUTPUT dataset.
b. In each OUTFIL statement test using INCLUDE for the flags you have in FILE1.
c. If the respective flag matches, write a simple JCL in that OUTFIL, using BUILD, within this JCL, override the dataset names- you can either hard-code the name, or go a step ahead and use SYMNAMES here and pass symbolic values for DSNs you want.
d. Route the 3 OUTFIL DS to INTRDR in SORTOUT DD names.

Now, what is going to happen is, depending on WHAT your flag value is, a fresh JCL will be created and submitted, within which DS2 to DS5 and so on will get processed - individually.

Like I'd said earlier - you didn't define the rules clearly here, so this solution does get the job done - fairly easily. icon_razz.gif
_________________
Thanks.


Viewing all articles
Browse latest Browse all 9405

Trending Articles