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
 

 

About SPLICE funtion of ICETOOL

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

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Mon Jan 11, 2010 5:04 pm    Post subject: About SPLICE funtion of ICETOOL
Reply with quote

Dears,

I got into knots when testing my cobol program.I think something looks like complicated can be achieved by sort in below situation:

file one,account information file in vsam sorted by account number.I selected my desired record as below into temp1:

OPTION COPY,VLSCMP
INCLUDE COND=(147,1,CH,EQ,C'H',OR,
147,1,CH,EQ,C'K',OR,
147,1,CH,EQ,C'4',OR,
147,1,CH,EQ,C'D',OR,
147,1,CH,EQ,C'G',OR,
147,1,CH,EQ,C'N')


16100000 0DHBCA 01/04/1017130500
1610036600004000000850 1 000000000MV
1610036600004000005140 131565794 000366000004
1610036600004000006110 131700986 000366000004
1610036600004000008160 131794686 000366000004
1610036600004000009130 131783344 000366000004
1610036600004000010140 1E793627 000366000A10
1610036600004000012190 1G703054 000366000004
1610036600004000014130 1H382557E 000366000004
......
......
......
1610036600004000500150
1610036600004000501120
1610036600004000503170
1610036600004000505110
1610036600004000507160
1610036600004000508130
1610036600004000509100
1610036600004000510110
1610036600004000511190


file two,account transaction log file also sorted by account no,I selected my desired records to temp2:

OPTION COPY,VLSCMP
INCLUDE COND=(29,4,CH,EQ,C'U101',OR,
29,4,CH,EQ,C'GTG8',OR,
29,4,CH,EQ,C'GTG6')
161003660000000000000020ST22..............1................................
16100366000040000051401733 ..
16100366000040000051400335 ..... . ?
16100366000040000061101733 ..
16100366000040000081600335 ........?
16100366000040000101400335 .......q.
16100366000040000141301733 ..
16100366000040000141300335 ........n.
16100366000040000161801733 ..
16100366000040000171501733 ..
16100366000040000171500335 .......?<
16100366000040000181201733 ..
16100366000040000201001733 ..
161003660000400002118007RS05..0 .000.......
16100366000040000211801733 ..
16100366000040000211800335 ..........
16100366000040000221501733 ..
16100366000040000221500335 .......l .
16100366000040000231201733 ..
16100366000040000251701733 ..
16100366000040000261401733 ..
16100366000040000271101733 ..
16100366000040000301701733 ..
16100366000040000301700335 ........ @
16100366000040000321101733 ..
16100366000040000331901733 ..

file three,my desired output file:browse temp2 one by one using account number in temp1,if account number matches then write the record directly in temp2 to the output file.

Can we use SPLICE of ICETOOL to reach this goal?Hope someone will give the jcl example.
Back to top
View user's profile Send private message

lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Mon Jan 11, 2010 6:41 pm    Post subject:
Reply with quote

some detail.

file1:
1-22:account number
other fields i don't need
file2:
1-22:account number
23-26:account trans type
output file:
1-22:account number
23-26:account trans type
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: Tue Jan 12, 2010 10:47 pm    Post subject:
Reply with quote

You haven't really given a clear description/example. It's very difficult to help when you just show us what you tried that didn't work without explaining what exactly you're trying to do. Please start over and supply the following information:

Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Wed Jan 13, 2010 8:45 am    Post subject:
Reply with quote

Frank,

file1:VB 9004 (keyed by account number and the record are unique)

Account number(22 Chars from position 1)+other fields

A1+1111111

A2+2522222333

A4+3666666


file2:VB 2185(keyed by account number but may have same account number)

Account number(22 Chars from position 1)+other fields

A1+xxxxxxxxxxxxxxx
A1+xxxxxxxxxxxx
A1+xxxxxxxxxxxxxxx
A2+xxxxxxxxxxxxxx
A3+xxxxxxxxxxxxxxxxx
A3+xxxxxxxxxxxxxxx
A4+xxxxxxxxxxxxxxxxx
A4+xxxxxxxxxxxxxxxxxxxx
A4+xxxxxxxxxxxxxxxxxx
A4+xxxxxxxxxxxx
A5+xxxxxxxxxxxxxxx
A5+xxxxxxxxxxxxxxxxx
A5+xxxxxxxxxxxxxxx
A6+xxxxxxxxxxxxxxxxxxx

desired output:

A1+xxxxxxxxxxxxxxx
A1+xxxxxxxxxxxx
A1+xxxxxxxxxxxxxxx
A2+xxxxxxxxxxxxxx
A4+xxxxxxxxxxxxxxxxx
A4+xxxxxxxxxxxxxxxxxxxx
A4+xxxxxxxxxxxxxxxxxx
A4+xxxxxxxxxxxx

Hope it is clear.
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 13, 2010 11:02 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for (you can add INCLUDE statements as needed but remember that the first data byte starts in position 5 after the RDW in positions 1-4):

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD DSN=... input file1 (VB/9004)
//IN2 DD DSN=... input file2 (VB/2185)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD LRECL=2185,DSN=...  output file (VB/2185)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(7,22,CH) VLENOVLY WITHALL -
  WITH(6,2182) USING(CTL3)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,4,C'BB',7:5)
/*
//CTL2CNTL DD *
  INREC BUILD=(1,4,C'VV',7:5)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(5,2,CH,EQ,C'BV'),
    BUILD=(1,4,5:7)
/*
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 How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts ICETOOL higher option Anshul Das DFSORT/ICETOOL 14 Thu Apr 14, 2016 8:00 am
No new posts Compare Files and extract matching re... vimalravi83 DFSORT/ICETOOL 3 Wed Jan 06, 2016 2:42 pm


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