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

DFSort card required


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jan 05, 2010 5:48 pm
Reply with quote

Dear Experts,

I have 2 Input files. They look as follows:

Code:
Input file 1: LRECL = 18
|< col1  >||<  col2  >|
9-char          9-char
AFF68KAA250178466M
A00780BA289700900T
A2486HIU682011727M
A2486HIV482013632M
A88997CB454124797M
B96996CG470076682M



Input file2: LRECL = 16

Code:
|<col1  >||<col2>|
12 char     3 char
AFF68KAA2001|456
AFF68KAA2011|376
AHF68KAA2002|232
B96996CG4023|786
A88997CB4342|795
A2486HIU6876|234



So, I want to generate the output files for every < col1> of input file1 exists in first 9-char of <col1> in input file2, then copy that record into output file.

Output File: LRECL = 16

Code:
AFF68KAA2001|456
AFF68KAA2011|376
B96996CG4023|786
A88997CB4342|795
A2486HIU6876|234

Pls help me in wrting the DFSORT Card.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jan 05, 2010 5:55 pm
Reply with quote

please use the bbcode tags it makes data more readable for people willing to help

( also Your other post was edited to use them )
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jan 05, 2010 6:00 pm
Reply with quote

Enrico.
I will make sure using BB codes in future posts.[/code]
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 06, 2010 12:07 am
Reply with quote

If you have the Nov, 2009 DFSORT PTF, you can use the following DFSORT JOINKEYS job to do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/18)
//IN2 DD DSN=...  input file2 (FB/16)
//SORTOUT DD DSN=...  output file (FB/16)
//SYSIN    DD    *
  JOINKEYS F1=IN1,FIELDS=(1,9,A)
  JOINKEYS F2=IN2,FIELDS=(1,9,A)
  REFORMAT FIELDS=(F2:1,24)
  SORT FIELDS=(17,8,ZD,A)
  OUTREC BUILD=(1,16)
/*
//JNF2CNTL DD *
  INREC OVERLAY=(17:SEQNUM,8,ZD)
/*


If you don't have the Nov, 2009 PTF, ask your System Programmer to install it (it's free). For details, see:

ibmmainframes.com/viewtopic.php?t=45147

If you can't use JOINKEYS, let me know and I'll show you how to do it in multiple passes with ICETOOL.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top