MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Extra byte added to all records in sort with header/trailer

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
rajeshm01
Beginner


Joined: 01 Jun 2012
Posts: 8
Topics: 2

PostPosted: Tue Jun 12, 2012 8:15 am    Post subject: Extra byte added to all records in sort with header/trailer Reply with quote

hello friends,

i am using below sysin in pgm=sort and i am getting an extra byte added to all the records. i am merging 3 files. kindly help.

output is 464 FB.
Code:

//SYSIN    DD *                                                       
      OPTION COPY                                                     
      OUTFIL FNAMES=SORTOP,                                           
      HEADER1=(1:14C'0','|',2C'0','|',10C'0','|',                     
                        'CPCARREXT1','|',DATENS(DM4),415X'40'),       
      TRAILER1=(1:14C'9','|',2C'9','|',10C'9','|',                     
                        'CPCARREXT1','|',COUNT=(M11,LENGTH=8),415X'40')

note: all lengths in sysin add upto 463. if i give 416X'40' to make it 464, job fails saying header/trailer is longer than file length mentioned in jcl!!

thanks!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue Jun 12, 2012 8:25 am    Post subject: Reply with quote

rajeshm01,

When you use reporting features such as Headerx/Trailerx Sort adds a print carriage control character. If your Input RECFM=FB , the output dataset RECFM will FBA. If you don't want the carriage control character , you can use the parm "REMOVECC" . so add the keyword on your OUTFIL statement like shown below.

Code:

//SYSIN    DD *                                                       
  OPTION COPY                                                     
  OUTFIL FNAMES=SORTOP,REMOVECC,                                           
  HEADER1=(1:14C'0','|',2C'0','|',10C'0','|',                     
             'CPCARREXT1','|',DATENS(DM4),415X'40'),       
  TRAILER1=(1:14C'9','|',2C'9','|',10C'9','|',                     
            'CPCARREXT1','|',COUNT=(M11,LENGTH=8),415X'40')
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Tue Jun 12, 2012 8:26 am    Post subject: Reply with quote

Do you want printer control codes in your records? That'd be an extra byte. Perhaps check REMOVECC?
Back to top
View user's profile Send private message
rajeshm01
Beginner


Joined: 01 Jun 2012
Posts: 8
Topics: 2

PostPosted: Tue Jun 12, 2012 9:44 am    Post subject: Reply with quote

thanks a lot kolusu!

learning is lot of fun and painful at the same time
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group