Thank you Alan!  That was indeed the problem.  I now get RC=4 for an incorrect 
trailer count, as needed.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Alan Young
Sent: Monday, June 27, 2016 7:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Verify record cound against the file trailer [by SORT?]

Hi Peter,

The fine print in Syncsort documentation states NULLOFL only applies to 
non-SORTOUT OUTFIL statements. If I change the DD of SORTOUT to OUT1 and add a 
FNAMES=OUT1 parameter to the OUTFIL statement then I get a CC 4 from Sri's 
example. I have not looked at DFSORT documentation in a while but I imagine it 
does not have this "condition" that Syncsort has that is making it incompatible.

Alan

Farley, Peter x23353 wrote:
> Hi Sri,
>
> I am a colleague of Victor's, and the initial problem was not stated quite 
> correctly.  The input file is RECFM=VB, and the trailer record is identified 
> by X'FF' in the first data position.  The record count to be checked in the 
> trailer record is at positions 145-155 (11 digits, ZD).  The count in the 
> trailer record does not include either the header record (X'00' in the first 
> position) nor the trailer record, so the count in the trailer record should 
> be the actual record count minus 2.  The desired result is to check the 
> trailer count versus the actual data record count and set RC=4  if they do 
> not agree.
>
> Unfortunately we do not actually have access to DFSORT any more, only 
> Syncsort.  May I ask you to please verify for me that if we were using DFSORT 
> that the control cards below would do what we wish?  If so then I can go to 
> our Systems Programmers to open a ticket with Syncsort for assistance in 
> verifying the operation of NULLOFL=RC4 in their product.
>
> When I use these control cards with Syncsort, the output file is null (has no 
> records) but Syncsort is not setting RC=4, so I will go to them for support 
> if the control cards I am using should give RC=4.
>
>   OPTION COPY                                              
> * ADD SEQNUM BETWEEN RDW AND DATA.                         
>   INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,5:SEQNUM,11,ZD,16:5)),
> * USE SEQNUM-2 TO PUT COUNT OF DATA RECORDS IN  POS 20 OF           
> * LAST RECORD (IDENTIFIED BY X'FF').                       
>       IFTHEN=(WHEN=(16,1,BI,EQ,X'FF'),                     
>          OVERLAY=(020:5,11,ZD,SUB,+2,M11,LENGTH=11))       
>   OUTFIL NULLOFL=RC4,                                      
>   INCLUDE=(016,1,BI,EQ,X'FF',AND,                          
>            (160,11,ZD,EQ,20,11,ZD)),                       
>          BUILD=(1,4,5:5)                                   
>
> Thank you for your generous and expert assistance on this forum.
>
> Peter

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to