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 

Insert Header and Tralier records into File

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


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Mon Apr 21, 2008 4:30 am    Post subject: Insert Header and Tralier records into File Reply with quote

Hi ,

I need to insert Header and Tralier records in to the file X.Y.Z which already have some data init. Let take an example

file X.Y.Z has following records with FB/80

Siva FCMS
Subhash TCS
Madhu Cylocops


I need the same file following format with header having the name of the file and total length of record and trailer having the description of total no of records.

File:X.Y.Z Length : 80---------------------> Header
Siva FCMS
Subhash TCS
Madhu Cylocops
Total Number of records : 03----------------------> Trailer


Thanks
Siva
Back to top
View user's profile Send private message
DaPlaze
Beginner


Joined: 29 Mar 2007
Posts: 9
Topics: 2

PostPosted: Mon Apr 21, 2008 7:04 am    Post subject: Reply with quote

Hi,

I'm not one of the best to answer this, but you don't write anything about language or anything.

In my head, with the knowledge I have, I would write a simple program to read the records, and create a new header and trailer for the file. Then I would write the header first and then move each of the records to the new file, having a counter so that I could make the trailer like you want it..

Don't know if it helps you anything but that's my 2 cents for thougts.
Back to top
View user's profile Send private message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Mon Apr 21, 2008 7:53 am    Post subject: Reply with quote

Hi DaPlaze,

Initially i thought to write simple program but my client doesn't want that.I could like to do this through ICETOOL or Syncsort.

Thanks,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Apr 21, 2008 9:50 am    Post subject: Reply with quote

sivafdms,


The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                     
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD *                                 
SIVA FCMS                                       
SUBHASH TCS                                     
MADHU CYLOCOPS                                 
//SORTOUT  DD SYSOUT=*                         
//SYSIN    DD *                                 
  SORT FIELDS=COPY                             
  OUTFIL REMOVECC,                             
  HEADER1=(C'X.Y.Z LENGTH : 80'),               
  TRAILER1=('TOTAL NUMBER OF RECORDS : ',COUNT)
/*                                             


Hope this helps...

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


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Tue Apr 29, 2008 4:51 am    Post subject: Reply with quote

Thanks Kolusu...
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