Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Selection from 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
erhan

New User


Joined: 27 Sep 2007
Posts: 5
Location: rotterdam

PostPosted: Fri Oct 24, 2008 6:55 pm    Post subject: Selection from 2 files
Reply with quote

Hello,

I need a sort JCl for the following:

In FileB are the accountnumbers which will be selected from FileA.

FileA: reclen 354 reclen. Accountnumbers are on positions 23 thru 29 in packed decimal format.
FileB: reclen 15 and Accountnumbers are on first 11 characters in ZD.

In FileA could it be duplicate accountnumbers, but not in B.

FileA:
Code:
<...><accountnbr1><data1>
<...><accountnbr2><data2>
<...><accountnbr3><data3>
<...><accountnbr3><data3a>
<...><accountnbr4><data4>
....

FileB:
Code:
<accountnbr1><...>
<accountnbr3><...>


Output should be:

Code:
<...><accountnbr1><data1>
<...><accountnbr3><data3>
<...><accountnbr3><data3a>


Can i use SYMNAMES for this?

Thx.

Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Oct 24, 2008 9:29 pm    Post subject:
Reply with quote

ERHAN,

The following DFSORT/ICETOOL JCL will give you the desired results


Code:

//STEP0100 EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN1      DD DSN=your 15 byte fileb,
//            DISP=SHR                                               
//IN2      DD DSN=YOUR 354 BYTE FILEB,
//            DISP=SHR               
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)         
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                       
  COPY FROM(IN1) USING(CTL1)                                         
  COPY FROM(IN2) USING(CTL2)                                         
  SPLICE FROM(T1) TO(OUT) ON(23,7,PD) WITHALL WITH(01,354) USING(CTL3)
//CTL1CNTL DD *                                                       
  OUTFIL FNAMES=T1,                                                   
  BUILD=(23:1,11,ZD,PD,LENGTH=7,355:1,11,ZD,PD,LENGTH=7)             
//CTL2CNTL DD *                                                       
  OUTFIL FNAMES=T1,OVERLAY=(355:7X)                                   
//CTL3CNTL DD *                                                       
  OUTFIL FNAMES=OUT,BUILD=(01,354),                                   
  INCLUDE=(23,7,PD,EQ,355,7,PD)                       
/*
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us