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
 

 

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 getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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