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
 
Concatenating 2 VB & 1 FB file and creating an Output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
raja_natural

New User


Joined: 07 Apr 2010
Posts: 2
Location: Mumbai

PostPosted: Sun Sep 27, 2015 2:36 am    Post subject: Concatenating 2 VB & 1 FB file and creating an Output file
Reply with quote

Hi,

I have below 3 input Input files

file 1: VB LRECL= 509
1-4 : ID (integer)
9-13 : Rec-type
14-23: Act-date

File 2: VB LRECL = 535
27-30 ID(integer)
35-39 rec-type
40-49 act-date

File 3: FB LRECL = 58

user_id 4
rec 6
PS-DATE 10
STRT-DATE 10
END-DATE 10
DTL-TYPE 10
TRANS 4
SRC 4

i wanted to copy all the files to a common output file.
i want to concatenate all the 3 files and create common output file.

file 1:

1111 AA 2015-10-01
2222 BB 2015-11-01

File 2:

3333 CC 2015-02-01
4444 CC 2015-01-16

5555 CC 2015-01-10 2015-01-11 2015-01-12 type1 ACCD XXXX
6666 CC 2015-01-10 2015-01-11 2015-01-12 type2 ABCX XXXX
7777 CC 2015-01-10 2015-01-11 2015-01-12 type3 AXXD XXXX


Output file should be :

1111 AA 2015-10-01
2222 BB 2015-11-01
3333 CC 2015-02-01
4444 CC 2015-01-16
5555 DD 2015-01-10 type1 ACCD XXXX
6666 DD 2015-01-11 type2 ABCX XXXX
7777 EE 2015-01-12 type3 AXXD XXXX


is it possible to combine all these steps and achieve the output result in one step.

Thanks in advance for your help.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Sep 27, 2015 12:25 pm    Post subject: Reply to: Concatenating 2 VB & 1 FB file and creating an Output file
Reply with quote

What happened to File 3 in your data?

You can concatenate the two VB files.
Back to top
View user's profile Send private message
raja_natural

New User


Joined: 07 Apr 2010
Posts: 2
Location: Mumbai

PostPosted: Sun Sep 27, 2015 2:08 pm    Post subject: Reply to: Concatenating 2 VB & 1 FB file and creating an Output file
Reply with quote

Sorry for the typo Bill.

File 3 : data
5555 CC 2015-01-10 2015-01-11 2015-01-12 type1 ACCD XXXX
6666 CC 2015-01-10 2015-01-11 2015-01-12 type2 ABCX XXXX
7777 CC 2015-01-10 2015-01-11 2015-01-12 type3 AXXD XXXX
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Sep 27, 2015 2:50 pm    Post subject: Reply to: Concatenating 2 VB & 1 FB file and creating an Output file
Reply with quote

Because of the mix of VB and FB you can't concatenate directly.

You could use SORT to convert (FTOV) your FB to VB, with VLTRIM if you have large numbers of some trailing value.

Then concatenate in a simple COPY.

If desperate for one step, there is ICETOOL.

Even JOINKEYS (concatenate the two VBs on F1, and put some lower value in a temporary extension in the JNF1CNTL, and the FB for F2, and put some higher value. "Match" on the temporary values (there won't be any) and use presence or otherwise to know where to build the output from (make the REFORMAT variable-length, and that's how it works for the "conversion" in this).
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm


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