Matchingthe trailer record with the number of records



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Re: Matchingthe trailer record with the number of records

Postby Frank Yaeger » Fri Apr 03, 2009 10:48 pm

Just to clarify something. You said

Rec-cnt field -
Starting position - 18
Length - 7


So why are you using 18,12,ZD in the INCLUDE condition rather than 18,7,ZD?

Is the length of the record count 7 or 12?

Also, what is the LRECL of the input file?
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: Matchingthe trailer record with the number of records

Postby Frank Yaeger » Fri Apr 03, 2009 11:18 pm

Here's a DFSORT job that will do what you want for the record count comparison. I assumed the count in the TRAILER record was 7 bytes long. The job works fine if the input file has just a header and trailer (count = 0).

//S1   EXEC  PGM=ICEMAN                                             
//SYSOUT DD  SYSOUT=*                                               
//SORTIN DD DSN=...  input file                                                       
//OUT DD DSN=...  output file                                                   
//SYSIN DD *                                                       
  OPTION COPY                                                       
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(31:SEQNUM,7,ZD)),               
    IFTHEN=(WHEN=INIT,OVERLAY=(31:31,7,ZD,SUB,+2,TO=ZD,LENGTH=7))   
  OUTFIL FNAMES=OUT,REMOVECC,NULLOFL=RC16,                         
    INCLUDE=(1,7,CH,EQ,C'TRAILER',AND,                             
     (18,7,ZD,EQ,31,7,ZD)),                                         
    BUILD=(C'No of records in input file = ',18,7,/,               
           C'TRailer record count = ',18,7)                         
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: Matchingthe trailer record with the number of records

Postby Frank Yaeger » Fri Apr 03, 2009 11:33 pm

Here's a DFSORT job that will do what you want for the Date comparison.

//D1   EXEC  PGM=ICEMAN
//SYSOUT DD  SYSOUT=*
//SORTIN DD DSN=...  Date file
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
  OPTION COPY
  INREC BUILD=(C'TDATE,''',4,10,UFF,M11,LENGTH=8,C'''',80:X)
/*
//D2   EXEC  PGM=ICEMAN
//SYSOUT DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file (w/TRAILER)
//OUT DD DSN=...     output file
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=OUT,REMOVECC,NULLOFL=RC16,
    INCLUDE=(1,7,CH,EQ,C'TRAILER',AND,
     (9,8,CH,EQ,TDATE)),
    BUILD=(C'Date in the trailer record = ',9,8,/,
           C'Date in the Date file = ',9,8)
/*
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: Matchingthe trailer record with the number of records

Postby shilpakhaire » Sat Apr 04, 2009 12:34 am

Hi Frank!

Can you please tell me a way to start?

Thanks,
shilpa
shilpakhaire
 
Posts: 17
Joined: Fri Oct 31, 2008 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Matchingthe trailer record with the number of records

Postby Frank Yaeger » Sat Apr 04, 2009 12:56 am

Can you please tell me a way to start?


Huh? Start what? Did you post this before you saw my two posts with the jobs (they were placed on page 2 of this thread).
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: Matchingthe trailer record with the number of records

Postby shilpakhaire » Sat Apr 04, 2009 1:41 am

Sorry for my earlier post!
Frank , can you please explain what this is doing? I think I'll have to make some chnages ....so If I understnd it, I can do it faster.

OPTION COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(31:SEQNUM,7,ZD)),
IFTHEN=(WHEN=INIT,OVERLAY=(31:31,7,ZD,SUB,+2,TO=ZD,LENGTH=7))
OUTFIL FNAMES=OUT,REMOVECC,NULLOFL=RC16,
INCLUDE=(1,7,CH,EQ,C'TRAILER',AND,
(18,7,ZD,EQ,31,7,ZD)),


Thnaks,
Shihlpa.
shilpakhaire
 
Posts: 17
Joined: Fri Oct 31, 2008 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Matchingthe trailer record with the number of records

Postby shilpakhaire » Sat Apr 04, 2009 2:02 am

When I try exeuting the job for the record count matching, i get an error -
SORTOUT/OUTFIL DATA SET CONTAINS NO DATA RECORDS.

Can you help me with this?

Shilpa
shilpakhaire
 
Posts: 17
Joined: Fri Oct 31, 2008 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Matchingthe trailer record with the number of records

Postby shilpakhaire » Sat Apr 04, 2009 2:15 am

I have put th LECL as 37 for output file and it gives me a RC of 16.ALso it says that there are no records in the output.
I tried using the manuals for more information, but could not find it.
So I thought it would be better to ask.

Thanks
Shilpa
shilpakhaire
 
Posts: 17
Joined: Fri Oct 31, 2008 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Matchingthe trailer record with the number of records

Postby Frank Yaeger » Sat Apr 04, 2009 2:28 am

When I try exeuting the job for the record count matching, i get an error -
SORTOUT/OUTFIL DATA SET CONTAINS NO DATA RECORDS.

Can you help me with this?


No, because that message indicates you're using Syncsort (WERxxxs messages), not DFSORT (ICExxxs messages).

The job I posted works fine with DFSORT using the original information you supplied.

Why are you posting in the DFSORT Forum when you're not using DFSORT? Please don't.

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
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: Matchingthe trailer record with the number of records

Postby shilpakhaire » Mon Apr 06, 2009 7:07 am

Hi !

I thought i had put my post in the Syncsort forum only. Board index ‹ 3rd PARTY MAINFRAME TOOLS ‹ Syncsort/Synctool.

Is there any othet forum where I shpuld post it, as this is the only Syncsort forum I could see.:(

Thanks
Shilpa
shilpakhaire
 
Posts: 17
Joined: Fri Oct 31, 2008 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post