|
View previous topic :: View next topic
|
| Author |
Message |
kris_madras
New User

Joined: 04 Jul 2005 Posts: 50
|
|
|
|
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 |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
| STFW suggests a MERGE operation. But I seem unable to test this in our environment. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
| To add, you can do the same with ICETOOL/SYNCTOOL, and are more portable. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
Two input files, one single record each of them???!!!  |
|
| Back to top |
|
 |
kris_madras
New User

Joined: 04 Jul 2005 Posts: 50
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
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 |
|
 |
|
|