Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DFSort card required

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSort card required
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10257
Location: italy

PostPosted: Tue Jan 05, 2010 5:55 pm    Post subject: Reply to: DFSort card required
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    Post subject: Hi
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 Moderator


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

PostPosted: Wed Jan 06, 2010 12:07 am    Post subject:
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:

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us