Joined: 17 Aug 2006 Posts: 13 Location: JHB, South Africa
Dear Frank,
I am fairly new in using ICETOOL, so I sure will appreciate your
expert opinion and help with a problem I have...
I have 2 input files...
The fist file is a report on jobnames and the abend code...e.g.
Code:
----+----1----+----2----+----3----+----4----+----
********************************* Top of Data ***
CMDOFES1 FLUSH SERVICES
NQMOPROF U3400 SOLUTIONS
******************************** Bottom of Data *
The second input file will look like this....
Code:
----+----1----+----2----+----3----+----4----+
********************************* Top of Data
AC THIBB BAAQ DIST (CORPORATE)
AD THIBB BAAQ DIST (DATED)
AF THIBB BAAQ DIST (5 DAY)
NQ CFDS1 BAAEE PNS
AO THIBB BAAQ DIST (1 DAY)
AP THIBC THIB ACCOUNTS PAYABLE
CM THIBC THGC1 CREDIT MANAGEMENT
Now Frank, I need is to match the first two characters of the jobsnames
in the frst input file, with the first two characters in the second input file.
The first two characters represent the first two characters of a jobname
for all the different applications.
Untimately, like in te exanple above, there should be two matches
and it should look something like this at the end of the day...
All I need is to match the jobs the first two characters of the second input file, and then write the info from the second file right next to
the info from the first input file.
Hope it makes sence, and hope to hear from you soon!
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, and I'm not sure I got the starting positions of all the input and output fields right, but this should give you the idea and you can change the job appropriately if necessary.
Joined: 17 Aug 2006 Posts: 13 Location: JHB, South Africa
Hello Frank,
Thank you for your help. The output is not right, but at least I can
sit down and try to puzzle thins thing out. If I do not get it right
I will ask for your help again.
----+----1----+----2----+----3----+----4----+--
********************************* Top of Data *
SVDOMUPA FLUSH SERVICES
CMDOFES1 FLUSH SERVICES
CMDOFES2 FLUSH SERVICES
NQMOPROF U3400 SOLUTIONS
IN2 file:
Code:
----+----1----+----2----+----3----+----4----+----5-
***************************** Top of Data *********
AZ THIBC CFDS1 PURE EXTRACTS
BC THIBB BAAE INTERNET
CM THIBA BAAH CREDIT MANAGEMENT
NQ THIBA BAA PRODUCT NOTIFICATION
NS THIBC THGC1 DBA DEPARTMENT
OCDJ THIBC BAAH BANKFIN OCS
OCDO THIBA BAAH ONLINE COLLECTIONS
OCMJ THIBC BAAH BANKFIN OCS
SV THIBB BAAE SAVINGS
I get the following output:
Code:
********************************* Top of Data *************************
CMDOFES2 FLUSH SERVICES THIBA BAAH CREDIT MANAGEMENT
NQMOPROF U3400 SOLUTIONS THIBA BAA PRODUCT NOTIFICAT
OC THIBC BAAH BANKFIN OCS
SVDOMUPA FLUSH SERVICES THIBB BAAE SAVINGS
Well this is already a much better but I still have one problem.
From IN1, if I have more than one CM* job that abended, it will only
take CMDOFES2, and discard CMDORES1.
I need both on the report with the decriptions next to it to say
it is a credit maagement product.
My IN2 file also have some duplicates on the first field and it is also displayed in the output file, but that I can take out with a sort if needed.
Notice that both CMDOFES records are shown as would be expected since I used WITHALL to handle that. I don't know why you aren't getting the first CMDOFES record. Are you sure you're actually using the job and input files you show? Are you using DFSORT (ICE messages) or another sort product?
Your first example did NOT have dups in file2 so I didn't code for that. That's easily handled by doing a SELECT ... FIRST on file2 to ensure there are no dups. I can show you how to do that, but first you need to figure out why you're not getting both CMDOFES records when I am.
Joined: 17 Aug 2006 Posts: 13 Location: JHB, South Africa
Hi Frank,
Ok I finally got all the CMDOFES records to show, thank you
very much for you help so far.
How do you do the select on the second file to get rid of the
duplicate records in there?
Joined: 17 Aug 2006 Posts: 13 Location: JHB, South Africa
Hi Frank,
Just one question again regarding this whole process we set up...
I have in my input two file a couple of duplicates
that I can not actually take out because the jobname
(first four bytes) each have a different standby group
(field 7-11). What happens now is that it keeps the first record
of the duplicates, and now send out the report with sometimes
the incorrect info (wrong standby group).
What suggestions do you have to get around this problem without changing too much in the current process?
The first two charaters CI = Client information
The third character will indicate if it is a daily monthly or weekly job
The fourth character will either be B, J, or O...was set up like
this because I receive these stats from more than one system.
The **** can be any alfa numeric value to be used as a job identifier.
Typical input file (IN1) will look like this...
----+----1----+----2----+----3----+----4-
***************************** Top of Data
CIDB1234 00012 SERVICES
CIDJ5678 U0222 SOLUTIONS
CIDO0102 U3400 SOLUTIONS
OCDO001A U1008 SOLUTIONS
Second input file (IN2) will look like this....it is actually
more than 300 records long but here is the part that
I will need to cater for...
The problem comes in where we splice the first two characters.
As mentioned above, in field four of the job name the charaters
will either be B, J or O.
Group THIBA will always be reponsible for B and O, and group
THIBC for J.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Are you saying that if the first two characters are CI, you want to match on the first four characters, but otherwise you want to match on the first two characters?
Joined: 17 Aug 2006 Posts: 13 Location: JHB, South Africa
Hi Frank, yes if we can do that it will definately work.
In future I can then use the same statement if needed
because we do add alot of new products on a quaterly basis.
Joined: 17 Aug 2006 Posts: 13 Location: JHB, South Africa
Hello Frank,
The JCL is working perfectly fine thank you very much.
If I do however encounter a similar situation with a different
jobname can I just repeat the following statement
with the correct jobname? I have replaced the CI jobs with **...