IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FileAid move data from two files to one output file


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kris_madras

New User


Joined: 04 Jul 2005
Posts: 50

PostPosted: Thu Feb 26, 2026 8:17 pm
Reply with quote

Hi,

I have data in two input files and I wanted to move to one output file with data from two files. Is this possible in fileaid batch? I have more input files to join.

Input1
-------------
USA

Input2
--------------
Wilmington, Delaware


Output
---------------
Wilmington, Delaware, USA
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1442
Location: Bamberg, Germany

PostPosted: Thu Feb 26, 2026 8:55 pm
Reply with quote

STFW suggests a MERGE operation. But I seem unable to test this in our environment.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1442
Location: Bamberg, Germany

PostPosted: Fri Feb 27, 2026 6:24 pm
Reply with quote

To add, you can do the same with ICETOOL/SYNCTOOL, and are more portable.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2286
Location: USA

PostPosted: Fri Feb 27, 2026 9:00 pm
Reply with quote

Two input files, one single record each of them???!!! 12.gif
Back to top
View user's profile Send private message
kris_madras

New User


Joined: 04 Jul 2005
Posts: 50

PostPosted: Sun Mar 01, 2026 2:22 pm
Reply with quote

Yes two input files and one output file. The problem is two input files LRECLs are different. So I can't use them in SORTIN DD statement.
Our workshop has SYNCSORT and not ok to use SYNCTOOL in production runs.
I checked the document, INPFIL allows multiples input files but OUTPUT files will be created for each of them. Unlike IBM DFSORT, hard to find good examples in SYNCSORT documentation.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2286
Location: USA

PostPosted: Mon Mar 02, 2026 7:14 pm
Reply with quote

Use extra control statements under
//JNF1CNTL DD *
INREC BUILD=(...)
//*

and
//JNF2CNTL DD *
INREC BUILD=(...)
//*

to make both files attributes equivalent before joining them in main control statements under //SYSIN DD *
JOINKEYS F1=...
JOINKEYS F2=...
. . . . . . .
//*


P.S.
When using JOIN option there is no need for input files to have equal file attributes!!!

P.P.S.
SYNCTOOL is only simple interface between JCL and real SYNCSORT.
All processing is being performed by exactly the same SYNCSORT.
Prohibiting its use in production only reveals lack of education of management staff.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts INPFIL FILES, FNAMES examples SYNCSORT 7
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Structured Data and Nested Loops via ... COBOL Programming 0
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
Search our Forums:


Back to Top