Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Splice multiple records into single record using icetool

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

New User


Joined: 15 Apr 2020
Posts: 3
Location: India

PostPosted: Wed Apr 15, 2020 10:55 pm    Post subject: Splice multiple records into single record using icetool
Reply with quote

Hi!
I have a requirement as below:
File 1:

//IN1 DD *
11111 000000 IN
22222 000000 UK

File 2:

//IN2 DD *
11111 333333 IN
11111 333331 IN
22222 444441 UK
22222 444442 UK
22222 444443 UK

My output should be below:
11111 000000 IN 333333 333331
22222 000000 UK 444441 444442 444443

Tried with icetool but getting below ouput:
11111 000000 IN333333
22222 000000 UK444441

It takes either only first or last occurence.

this is what i have used:

COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT12) ON(1,5,ZD) WITHANY-
WITH(16,7) KEEPNODUPS

CTL1:INREC OVERLAY=(1,15,500Z)

CTL2: INREC OVERLAY=(1,5,16:7,6)
Back to top
View user's profile Send private message

Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 292
Location: Bamberg, Germany

PostPosted: Thu Apr 16, 2020 1:37 pm    Post subject:
Reply with quote

And you really think that someone is willing to help you providing only these little details? icon_evil.gif
Back to top
View user's profile Send private message
sarankriya

New User


Joined: 15 Apr 2020
Posts: 3
Location: India

PostPosted: Thu Apr 16, 2020 7:13 pm    Post subject:
Reply with quote

Apologies for not providing sufficient details

file1 is of length 15 bytes
1-5 bytes-Branch code
7-12 bytes-Account no(will be always zeroes)
14-15 bytes-country code

file2 is of length 15 bytes
1-5 bytes-Branch code
7-12 bytes-Account no
14-15 bytes-country code

Branch code is the key from first file where i need to get all the matching account no from file2 and i need to write all matching account no in a single record

File 1:

//IN1 DD *
11111 000000 IN
22222 000000 UK

File 2:

//IN2 DD *
11111 333333 IN
11111 333331 IN
22222 444441 UK
22222 444442 UK
22222 444443 UK

My output should be below:
11111 000000 IN 333333 333331
22222 000000 UK 444441 444442 444443
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2378
Location: Hampshire, UK

PostPosted: Thu Apr 16, 2020 7:27 pm    Post subject: Reply to: Splice multiple records into single record using icetool
Reply with quote

What if there are no records in dataset (not file) 2 for a branch code in dataset 1? And the same for accounts for a branch in dataset 2 but that branch does not appear in dataset 1?
Back to top
View user's profile Send private message
sarankriya

New User


Joined: 15 Apr 2020
Posts: 3
Location: India

PostPosted: Thu Apr 16, 2020 11:42 pm    Post subject:
Reply with quote

Hi Nick,
File 2 is a master file.It would have all the combinations.
We have to match file 1 with file 2 to get in a single record.
If a record is in file2 but not in file1 ,thats nowhere needed
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 Multiple Sums in one File Rick Ryan SYNCSORT 2 Wed Jul 29, 2020 1:30 am
No new posts Retrieve multiple records with metaco... Jose Juan J CA Products 0 Sat Jul 25, 2020 1:36 am
No new posts Multiple Entry josephineyeow PL/I & Assembler 5 Sat Jul 25, 2020 1:07 am
No new posts PKZIP - extracting multiple txt files drarem All Other Mainframe Topics 3 Tue Jul 07, 2020 8:47 pm
No new posts Problem getting record length of a re... amitc23 COBOL Programming 2 Thu Jul 02, 2020 10:52 pm

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