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 

Expand FB records & add trailer record with file count

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


Joined: 03 Jan 2003
Posts: 4
Topics: 1
Location: California

PostPosted: Thu Oct 11, 2007 1:06 pm    Post subject: Expand FB records & add trailer record with file count Reply with quote

I am almost ashamed to admit that I can't solve my own problem (must be my old age), but here is what I need to do and what I have done so far:

(1) I have a FB file with an LRECL of 200
(2) I would like to pass this file through a SORT step with the output including a header record of the file count and literal strings
(3) Also - I need the output file LRECL expanded to 500 bytes by padding spaces on each record.

I have done the following to create an individual record with the file count and my literal string. This works fine.

Code:

  SORT FIELDS=(COPY)                                   
  OUTFIL REMOVECC,NODETAIL,                           
    TRAILER1=(COUNT=(M11,LENGTH=15),'RETAILSTYLE00145'


What I can not figure out (and I have been trying!!) is how to expand the records to 500 bytes??

Any help?
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Oct 11, 2007 1:13 pm    Post subject: Reply with quote

How about

Code:

  SORT FIELDS=(COPY)
  OUTFIL REMOVECC,NODETAIL,
     TRAILER1=(COUNT=(M11,LENGTH=15),'RETAILSTYLE00145',
     OUTREC=(500:X)
Back to top
View user's profile Send private message
devjfl1
Beginner


Joined: 03 Jan 2003
Posts: 4
Topics: 1
Location: California

PostPosted: Thu Oct 11, 2007 2:13 pm    Post subject: Reply with quote

superk wrote:
How about

SORT FIELDS=(COPY)
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M11,LENGTH=15),'RETAILSTYLE00145',
OUTREC=(500:X)


That works fine for expanding the record that is created for the count. But how to do this with all of the detail records?
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Oct 11, 2007 2:31 pm    Post subject: Reply with quote

Remove NODETAIL and add OVERLAY=(500:X). Here's the DFSORT job:

Code:

//S1    EXEC  PGM=ICEMAN                                             
//SYSOUT    DD  SYSOUT=*                                             
//SORTIN DD DSN=...  input file (FB/200)                                 
//SORTOUT DD DSN=...  output file (FB/500)       
//SYSIN    DD    *                                                   
  SORT FIELDS=(COPY)                                                 
  OUTFIL REMOVECC,                                                   
    OVERLAY=(500:X),                                                 
    TRAILER1=(COUNT=(M11,LENGTH=15),'RETAILSTYLE00145')               
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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