Page 2 of 3

Re: Matchingthe trailer record with the number of records

PostPosted: Fri Apr 03, 2009 10:48 pm
by Frank Yaeger
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?

Re: Matchingthe trailer record with the number of records

PostPosted: Fri Apr 03, 2009 11:18 pm
by Frank Yaeger
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)                         

Re: Matchingthe trailer record with the number of records

PostPosted: Fri Apr 03, 2009 11:33 pm
by Frank Yaeger
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)
/*

Re: Matchingthe trailer record with the number of records

PostPosted: Sat Apr 04, 2009 12:34 am
by shilpakhaire
Hi Frank!

Can you please tell me a way to start?

Thanks,
shilpa

Re: Matchingthe trailer record with the number of records

PostPosted: Sat Apr 04, 2009 12:56 am
by Frank Yaeger
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).

Re: Matchingthe trailer record with the number of records

PostPosted: Sat Apr 04, 2009 1:41 am
by shilpakhaire
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.

Re: Matchingthe trailer record with the number of records

PostPosted: Sat Apr 04, 2009 2:02 am
by shilpakhaire
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

Re: Matchingthe trailer record with the number of records

PostPosted: Sat Apr 04, 2009 2:15 am
by shilpakhaire
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

Re: Matchingthe trailer record with the number of records

PostPosted: Sat Apr 04, 2009 2:28 am
by Frank Yaeger
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.

Re: Matchingthe trailer record with the number of records

PostPosted: Mon Apr 06, 2009 7:07 am
by shilpakhaire
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