Posted: Mon Dec 19, 2005 12:03 pm Post subject: Help with ICETOOL Job
I have an existing job that processes the concatenation of files that have record tags for Header, Group & Letter. The ICETOOL splits the file, and creates Trailer record with the count of Group & Letter records.
Problem: if the Details file (containing Group & Letter records) is empty, I get garbage in the trailer record, and I was trying to fix it, so that I would get a good Trailer record with zeroes.
If it can be done with just changing the control cards and no JCL changes, that would be even better, b/c I won't need to re-migrate changes, just copy in the new control cards.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Dec 19, 2005 12:25 pm Post subject:
It's a little hard to jump in in the middle like this.
Could you please show me an example of the records in each input file for both the "non-empty" and "empty" cases, and what you want the output file to look like for each of those cases. What is the RECFM and LRECL of each input file?
Are you interested in a solution that requires less passes if I can come up with one?
Also, please run the following job and post the //SYSOUT output (substitute a blank for each b):
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Last edited by Frank Yaeger on Tue Dec 20, 2005 3:26 pm; edited 1 time in total
Frank,
the Input files & Output Files LRECL=1000, RECFM=FB.
The Header file always has 1 record data.
The Detail file is always in concatenation, but may or may not have data.
The sample of Detail file I posted. data past the tag (between
'<' and '>') is irrelevant.
I am having a problem when the Detail file is empty, my output file gets 2 records: Header and the second record is garbage.
I was thinking of adding somehow a Trailer rec with all zeroes to F1 & F2, but few things I tried didn't work.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Dec 19, 2005 5:01 pm Post subject:
You say "The sample of Detail file I posted", but I don't see a Detail file in your example and I don't see any sample records. You say "The Header file", but I don't see a Header file in your example. All I see is DD statements and I don't know how those files relate to the "Header" and "Detail" files you refer to or what the records look like in any of the files you're using. That's why I asked for specific information in my first post to help me understand what you're doing so I could see how to help you.
If you can't or won't supply all of the information I asked for in my first post, then I can't help you. If you'd prefer to send me the information offline (yaeger@us.ibm.com), that's fine, but please put "DFSORT" somewhere in your Subject line to catch my attention. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Dec 20, 2005 4:26 pm Post subject:
Mike,
Based on our offline conversations, here's a one-pass DFSORT job that will do what I think you want:
Code:
//JSTEP010 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=HEADER.FILE,DISP=SHR
// DD DSN=DETAILS.FILE,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE.GDG(+1),
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(15,10),RLSE)
//SYSIN DD *
OPTION COPY
* Add +0 in 1001-1010 and 1011-1020 for all records
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(1001:C'0000000000',1011:C'0000000000')),
* If the record has <<GROUP>, put +1 in 1001-1010
IFTHEN=(WHEN=(1,10,CH,EQ,C'<<GROUP> '),
OVERLAY=(1001:C'0000000001')),
* If the record has <<LETTER>, put +1 in 1011-1020
IFTHEN=(WHEN=(1,10,CH,EQ,C'<<LETTER>'),
OVERLAY=(1011:C'0000000001'))
OUTFIL REMOVECC,
* Set up TRAILER1 with total of 1001-1010 and 1011-1020
TRAILER1=(C'<TRAILER>',11:TOT=(1001,10,ZD,M11,LENGTH=10),
21:TOT=(1011,10,ZD,M11,LENGTH=10)),
* Remove 1001-1020
OUTREC=(1,1000)
/*
You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's IFTHEN and OVERLAY functions (that's why I asked you to run the OVERLAY job). If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
HEADER> Some Data Goes In the Header
GROUP>
LETTER> 111111111 01EN999999999
<LETTER>
LETTER> 111111111 12EN999999999
INDVDUAL>Smith, Joe
INDVDUAL>Smith, Jane
<LETTER>
<GROUP>
TRAILER> 00000000010000000002
For the empty case, SORTOUT has:
Code:
<HEADER> Some Data Goes In the Header
<TRAILER> 00000000000000000000
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum