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

Joined: 04 Jul 2005 Posts: 50
|
|
|
|
I think INPFIL feature is only in syncsort. This allows to read multiple input files which are different attributes. I tried to run using INPFIL in SORT but it is not working.
| Code: |
//STEP001 EXEC PGM=SORT
//SORTIN1 DD DSN=ABC,DISP=SHR
//SORTIN2 DD DSN=XYZ,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INPFIL FILES=(1,2)
SORT FIELDS=COPY |
I am getting error "DSS20011E DD 'SORTIN' WAS NOT ALLOCATED" |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
RTFM
In this case it's enough just to read English!
Nothing to add here... |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
FYI:
| Quote: |
Using control statements from other IBM programs
The INPFIL control statement, which is used by other IBM sort programs, is accepted but not processed. |
| Quote: |
Input data sets—SORTIN and SORTINnn
DFSORT processes two types of input data sets, referred to as the SORTIN data set (or just SORTIN) and the SORTINnn data sets (or just SORTINnn).
The SORTIN DD statement specifies the input data set (or concatenated input data sets) for a sort or copy application. If a SORTIN DD statement is present, it will be used by default for a sort or copy application unless you invoke DFSORT from a program with the address of an E15 user exit in the parameter list.
The SORTINnn DD statements (where nn can be 00 to 99) specify the data sets for a merge application. If a SORTINnn DD statement is present, it will be used by default for a merge application unless you invoke DFSORT from a program with the address of an E32 user exit in the parameter list.
“Data set considerations ” on page 13 contains general information about input data sets. For specific information about the SORTIN data set, see “SORTIN DD statement” on page 66 . For specific information about the SORTINnn data sets, see “SORTINnn DD statement” on page 68 . |
P.S.
Your question is about DFSORT, but placed under SYNCSORT forum. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
I was playing around a bit avoiding the need for SYNCTOOL/ICETOOL and JOIN operations. Maybe not the best solution, but should work up to the limit of SORTINnn datasets. IIRC every input dataset has just one line.
| Code: |
//WHATEVER EXEC PGM=ICEMAN,PARM='MSG=NO'
//SORTIN01 DD *
BANGOR, MAINE
/*
//SORTIN02 DD *
USA
/*
//SORTIN03 DD *
PARIS, TEXAS
/*
//SORTIN04 DD *
United States
/*
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION VLSCMP
DEBUG ABEND,NOESTAE
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(50:SEQNUM,8,BI,START=0)),
IFTHEN=(WHEN=GROUP,BEGIN=(57,1,BI,EQ,B'.......0'),
PUSH=(1,14),RECORDS=2)
MERGE FIELDS=(50,8,BI,A)
OUTFIL FNAMES=(SORTOUT),
INCLUDE=(57,1,BI,EQ,B'.......1'),
REMOVECC,
BUILD=(1,49)
END
/* |
| Code: |
****** ***************************** Top of Data ****
000001 BANGOR, MAINE USA
000002 PARIS, TEXAS United States
****** **************************** Bottom of Data *** |
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
Cannot imagine real business requirements with such input data design...
| Code: |
//SORTIN01 DD *
BANGOR, MAINE
/*
//SORTIN02 DD *
USA
/*
//SORTIN03 DD *
PARIS, TEXAS
/*
//SORTIN04 DD *
United States
/* |
Maybe only as a game? Or initial training for school students? |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
It looks very strange to have such constructs, that is definitely true.  |
|
| Back to top |
|
 |
kris_madras
New User

Joined: 04 Jul 2005 Posts: 50
|
|
|
|
Thanks for the feedback and solutions. Let me give a try.
Actually, I was looking for solution to read in from multiple input files and reformat separately and write to different output files and one for each.
| Code: |
SORTIN01 --> REFORMAT1 --> SORTOUT01
SORTIN02 --> REFORMAT 2--> SORTOUT02
..........
SORTIN10 --> REFORMAT10 --> SORTOUT10 |
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| kris_madras wrote: |
Thanks for the feedback and solutions. Let me give a try.
Actually, I was looking for solution to read in from multiple input files and reformat separately and write to different output files and one for each.
| Code: |
SORTIN01 --> REFORMAT1 --> SORTOUT01
SORTIN02 --> REFORMAT 2--> SORTOUT02
..........
SORTIN10 --> REFORMAT10 --> SORTOUT10 |
|
Even more strange requirement...
Like hammering nails using a microscope. It is possible, but...  |
|
| Back to top |
|
 |
|
|