Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Trailer count is 1 less than actual no. of records.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Tue Jan 17, 2012 5:40 pm    Post subject: Trailer count is 1 less than actual no. of records.
Reply with quote

Hi,

I have used below sysin card to count the no. of records per type in infile.

//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
SECTIONS=(1,2,
TRAILER3=(1,255,X,COUNT=(M11,LENGTH=5)))

output:

05 abcd
05 abcd
05 abcd 02
06 1bcd
06 1bcd 01

I need like this
05 abcd
05 abcd
05 abcd 03
06 1bcd
06 1bcd 02

actual count is 3 rec on 05 type and 2 rec in 06 type.. i think it considers first rec on each type as header. Pls help me in resolving this.
Back to top
View user's profile Send private message

yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Tue Jan 17, 2012 5:46 pm    Post subject: Reply to: Trailer count is 1 less than actual no. of records
Reply with quote

Hi,

I have used below sysin and it gives the correct count. But i am curious to know why the count is 1 less than the actual record.. It is right to say that it considers 1 record as header for each type?

OPTION COPY
OUTFIL REMOVECC,
SECTIONS=(1,2,
TRAILER3=(1,255,X,COUNT+1=(M11,LENGTH=5)))

Thanks,
Yuge
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Tue Jan 17, 2012 5:57 pm    Post subject: Reply to: Trailer count is 1 less than actual no. of records
Reply with quote

You haven't shown your input file, so I'm going to have to guess you have no trailers on that, and no headers.

You are not generating a header.

The SECTIONS processing is going to count all the records for that level of "break". You are generating a trailer record, with the count of the detail records. If you want to include the trailer record in the count of records on the trailer, you have to do what you have done.

So, no, in no way is the first detail record being considered a header. You have confused yourself by expecting that the trailer would be automatically counted.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 6 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us