It is quite easy to get the desired results using Joinkeys.  The sample 
data you have shown does not have any matching records.  It would have 
been nice if you showed the required output also

//STEP0100 EXEC PGM=SORT 
//SYSOUT   DD SYSOUT=* 
//INA      DD * 
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--   
 
1O1578 PAS.CMN.PADCMN02.CMNRPROM.D130423.T0545      23/04/2013 
1O4901 PAS.CMN.PADCMN02.CMNRPROM.D130424.T0543      24/04/2013 
1B4778 GET.THIS.DATASET.NAME.ASIT.MATCHED           24/04/2013 
//INB      DD * 
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
1B2906,DEFERRED,QUEUED,49:18:37,3.90 
1B4236,DEFERRED,QUEUED,48:54:04,2.63 
1B4778,DEFERRED,QUEUED,48:49:18,3.90 
1B4852,DEFERRED,QUEUED,48:46:45,3.90 
//SORTOUT  DD SYSOUT=* 
//SYSIN    DD * 
  OPTION COPY 
  JOINKEYS F1=INA,FIELDS=(1,6,A) 
  JOINKEYS F2=INB,FIELDS=(1,6,A) 
  REFORMAT FIELDS=(F1:1,52) 
//* 

The output from this job is 

1B4778 GET.THIS.DATASET.NAME.ASIT.MATCHED

If you just need the dataset name then change the REFORMAT statement to 
the following

 REFORMAT FIELDS=(F1:8,44) 

which will produce this output

GET.THIS.DATASET.NAME.ASIT.MATCHED

Hope this helps...

Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <[email protected]> wrote on 
05/15/2013 04:05:03 AM:

> From: af dc <[email protected]>
> To: [email protected], 
> Date: 05/15/2013 04:06 AM
> Subject: DFSORT/ICETOOL: merge records from 2files
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> Hello,
> I know this is a newbie question and I got "User Guide for DFSORT PTFs
> UK51706 and UK51707" near me, but I can't get this done:
> 
> >>> F1 file:
> EDIT       PRS.CTT.FWK310
> Command ===>
> ****** ***************************** Top of D
> 000001 1B2906,Deferred,Queued,49:18:37,3.90
> =COLS> ----+----1----+----2----+----3----+---
> 000002 1B4236,Deferred,Queued,48:54:04,2.63
> 000003 1B4778,Deferred,Queued,48:49:18,3.90
> 000004 1B4852,Deferred,Queued,48:46:45,3.90
> 
> >>> F2 file:
> EDIT       PRS.CTT.FWK120                              Columns 00001 0
> Command ===>                                                  Scroll 
===>
> ****** ***************************** Top of Data 
*************************
> 000001   1O1578 PAS.CMN.PADCMN02.CMNRPROM.D130423.T0545  23/04/2013
> =COLS> 
----+----1----+----2----+----3----+----4----+----5----+----6----+--
> 000002   1O4901 PAS.CMN.PADCMN02.CMNRPROM.D130424.T0543  24/04/2013
> 
> Both files are FB/80. I want to get all dsns from F2 file from F1 volser
> list., so key is 1,6 in both files. Any hints are welcome.
> 
> Many thx, A.Cecilio
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to