Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

concatenate 2 file with header and trailer

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

New User


Joined: 21 Nov 2013
Posts: 3
Location: India

PostPosted: Thu Nov 21, 2013 12:26 pm    Post subject: concatenate 2 file with header and trailer
Reply with quote

Hi,

Could you please help with the below Sort criteria.
Merge two files into a single file with header,detail and trailer and update the trailer totals.

File1 : Header1,Detail1 ,Trailer1
------------------------------------------------------
Code:
020121217                        >>>>>>>>>>>>>HEader 1                     
1  00000000006655075  % 
2  %  Ãí * 
3  %  Ãí * 
3  %  Ãí * 
1  00000005994793512  ñ 
2  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
1  00000005996934809  h@
2  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
900000003                        >>>>>>>>TRAILER 1 (Number of customer  total of 1's in first column)



File2 : Header2,Detail2 ,Trailer2

Same as above.

Output :

File3 : Header1,Detail1,Detail2,Trailer3
Code:
020121217                        >>>>>>>>>>>>>HEader 1                     
1  00000000006655075  % 
2  %  Ãí * 
3  %  Ãí * 
3  %  Ãí * 
1  00000005994793512  ñ 
2  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
1  00000005996934809  h@
2  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@                     
1  00000000006655075  % 
2  %  Ãí * 
3  %  Ãí * 
3  %  Ãí * 
1  00000005994793512  ñ 
2  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
3  rålé  ã*  ñ 
1  00000005996934809  h@
2  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
3  rÑ Øæ ã*  h@
900000006                    >>>>>>>>TRAILER 1 (Number of customer total of 1's in first column)


Can any one suggest a much easier solution to the above sort.
please tell me if some one need some more info

Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Nov 21, 2013 12:50 pm    Post subject: Reply to: concatenate 2 file with header and trailer
Reply with quote

Much easier than what? If you already have something, please show it. If you don't, why not?

Also we need to see the expected output from the sample input you have shown, and a description of what goes on.

Please use the Code tags:

Code:
Like     This.   To preserver           Spacing.
Back to top
View user's profile Send private message
jainsunilkansal

New User


Joined: 21 Nov 2013
Posts: 3
Location: India

PostPosted: Thu Nov 21, 2013 1:00 pm    Post subject:
Reply with quote

I given output file as well that is sample output .

Output :

File3 : Header1,Detail1,Detail2,Trailer3
Code:
020121217 >>>>>>>>>>>>>HEader 1
1 00000000006655075 %
2 % Ãí *
3 % Ãí *
3 % Ãí *
1 00000005994793512 ñ
2 rålé ã* ñ
3 rålé ã* ñ
3 rålé ã* ñ
3 rålé ã* ñ
3 rålé ã* ñ
1 00000005996934809 h@
2 rÑ Øæ ã* h@
3 rÑ Øæ ã* h@
3 rÑ Øæ ã* h@
3 rÑ Øæ ã* h@
1 00000000006655075 %
2 % Ãí *
3 % Ãí *
3 % Ãí *
1 00000005994793512 ñ
2 rålé ã* ñ
3 rålé ã* ñ
3 rålé ã* ñ
3 rålé ã* ñ
3 rålé ã* ñ
1 00000005996934809 h@
2 rÑ Øæ ã* h@
3 rÑ Øæ ã* h@
3 rÑ Øæ ã* h@
3 rÑ Øæ ã* h@
900000006 >>>>>>>>TRAILER 1 (Number of customer total of 1's in first column)


Code'd
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 21, 2013 1:05 pm    Post subject:
Reply with quote

Use the CODE tags

Code:
[code] Put what you want in here [/code]
Back to top
View user's profile Send private message
jainsunilkansal

New User


Joined: 21 Nov 2013
Posts: 3
Location: India

PostPosted: Thu Nov 21, 2013 3:05 pm    Post subject:
Reply with quote

Waiting for the post's..if anyone knows solutions please advice
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Nov 21, 2013 3:12 pm    Post subject: Reply to: concatenate 2 file with header and trailer
Reply with quote

soliciting for answers after only 3 hours from the initial post is inconsiderate

remember, replying on a forum is ...
on voluntary base
on our own time

if You have time constraint a forum is not the best place to ask for help
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us