Need a lowvalue record not an empty file



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Need a lowvalue record not an empty file

Postby speermb » Tue Dec 22, 2009 6:32 pm

I have a sort with this card:
SORT FIELDS=(3,8,CH,A)
SUM FIELDS=(1,2,BI)
OUTFIL FNAMES=SORTOF01,INCLUDE=(1,2,BI,EQ,X'0003'),
OUTREC=(1:3,8,19:C'A',31X)

Recfm = Fb, LREC= 50.

File 1:
..1AD05A00
00FCCFFCFF
0111405100
---------
..1AF10A05
00FCCFFCFF
0111610105
---------
..1AF10A07
00FCCFFCFF
0111610107

File 2
---------
..1AF10A10
00FCCFFCFF
0211610110
---------
..1AG03A01
00FCCFFCFF
0211703101
---------
..1AG03A27
00FCCFFCFF
0211703127

Because none of the data between 3-10 are on both files, nothing will get sent to teh output. When this happens I need a low value record in the output.
speermb
 
Posts: 7
Joined: Thu Nov 05, 2009 9:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need a lowvalue record not an empty file

Postby Frank Yaeger » Tue Dec 22, 2009 9:07 pm

Because none of the data between 3-10 are on both files, nothing will get sent to teh output.


Huh? The reason no records are written is that none satisfy the INCLUDE=(1,2,BI,EQ,X'0003') condition.

When this happens I need a low value record in the output.


So if no records meet the INCLUDE condition, you want one record to be written to SORTOF01?
What exactly do you mean by a "low value record" - 50 binary zeros or something else?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Need a lowvalue record not an empty file

Postby speermb » Wed Dec 23, 2009 12:46 am

Yes -- none match the BI = 0003, because the 2 files are summed together to give a X'0003" on duplicates. Yes I mean a binray zeros.
speermb
 
Posts: 7
Joined: Thu Nov 05, 2009 9:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need a lowvalue record not an empty file

Postby Frank Yaeger » Thu Dec 24, 2009 1:02 am

If I understand what you want (and I'm not sure I do), this DFSORT/ICETOOL job should do it:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//IN DD DSN=...  input file1 (FB/50)
//   DD DSN=...  input file2 (FB/50)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//SORTOF01 DD DSN=...  output file (FB/50)
//TOOLIN   DD    *
SORT FROM(IN) USING(CTL1)
COPY FROM(T1) TO(SORTOF01) USING(CTL2)
/*
//CTL1CNTL DD *
  SORT FIELDS=(3,8,CH,A)
  SUM FIELDS=(1,2,BI)
  OUTFIL FNAMES=T1,REMOVECC,INCLUDE=(1,2,BI,EQ,X'0003'),
   OUTREC=(1:3,8,19:C'A',31X),
   TRAILER1=('CTID',COUNT=(M11,LENGTH=8))
/*
//CTL2CNTL DD *
  INREC IFTHEN=(WHEN=(1,4,CH,EQ,C'CTID',AND,5,8,ZD,EQ,0),
    OVERLAY=(1:50Z))
  OUTFIL OMIT=(1,4,CH,EQ,C'CTID')
/*


If that doesn't work for some particular case, show me an example of the input and output records for that case.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post