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
 

 

Help on ICETOOL

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

New User


Joined: 16 Mar 2005
Posts: 8
Location: chennai

PostPosted: Tue Oct 12, 2010 8:08 pm    Post subject: Help on ICETOOL
Reply with quote

I have two input file A and B. I need the records from both the input files A and B. If A key matches with the B file key, I need to write to output file only from file A not from file B.

for eg:

A- file DATA
-------------
Code:
-----+----1----+-----
AAAAAAAAAAAAAAA
22222222222222222
CCCCCCCCCCCCC
ZZZZZZZZZZZZZZZ


B-File data
-------------

Code:
AAAAAAAAAAAAAAA
22222222222222222
CCCCCCCCCCCCC
ZZZZZZZZZZZZZZZ

Output I need
----------------
Code:
AAAAAAAAAAAAAAA  ----->Must be from A file
22222222222222222
CCCCCCCCCCCCC
11111111111111111
ZZZZZZZZZZZZZZZ  ------> Must be from A file


Key is 17 byte filed - for eg: "AAAAAAAAAAAAAAA" is a key here.

Please note File B is a VSAM-KSDS file.

I need to fulfill this requirement only with ICETOOL as per the client requirement.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Oct 12, 2010 8:30 pm    Post subject: Reply to: Help on ICETOOL
Reply with quote

there is a language barrier here, or You made a mistake in pasting/describing the content of the files

since in the case posted the A and B file keys are the same all the output records should come file A

please post a more significant sample and use the code tags
and clarify better Your requirement

seems silly to put a requirement on the tool to be used for a task
would it make so much difference if instead of ICETOOL SORT were used ???
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 Oct 12, 2010 9:59 pm    Post subject:
Reply with quote

main_prem,

11111111111111111

Where did this output record come from? It is not in either input file.

It's not clear from your explanation and example what it is you want to do.

What is the RECFM and LRECL of each input file?

Can input file1 have duplicates within it? Can input file2 have duplicates within it?

Please show a better example including duplicates within files if appropriate, and explain clearly the rules for getting from input to output.

Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*
Back to top
View user's profile Send private message
main_prem

New User


Joined: 16 Mar 2005
Posts: 8
Location: chennai

PostPosted: Tue Oct 12, 2010 11:47 pm    Post subject: Reply to: Help on ICETOOL
Reply with quote

Hi Frank,

Sorry, I think I did a mistake while copying the example.

Here is my requirement..

File A
------
Code:
AAAAAAAAAAAAAAAAAWSADFGHTK
BBBBBBBBBBBBBBBBBBBZABVCDTGY
CCCCCCCCCCCCCCCCCXCVBNMLKJ
DDDDDDDDDDDDDDDDDWERTYUIOP


File B
------
Code:
AAAAAAAAAAAAAAAAAKLJMBGHFT
1111111111111111111LMKPWASZ
2222222222222222222CXZWTYUH
DDDDDDDDDDDDDDDDDZAWERTYN

Output
-------

Code:
AAAAAAAAAAAAAAAAAWSADFGHTK
BBBBBBBBBBBBBBBBBBBZABVCDTGY
CCCCCCCCCCCCCCCCCXCVBNMLKJ
DDDDDDDDDDDDDDDDDWERTYUIOP
1111111111111111111LMKPWASZ
2222222222222222222CXZWTYUH


1) Key is first 17 bytes of the record.
2)Input File A will be in sorted order and there will not be duplicate.
3)Input File B will be in sorted order and there may be duplicates.
4)Both the Input and output file are FB and LRECL=95.
5)If the file A and B key matched, then record from file A should written to output file(In the above example ouput as 1 and 4 th record)
6)Output file should contain all the records from file A and B(as like records 2,3,4,5 in the output file).

Hope this will be clear. Please let me know if you need any more information.

Thanks!
Back to top
View user's profile Send private message
main_prem

New User


Joined: 16 Mar 2005
Posts: 8
Location: chennai

PostPosted: Tue Oct 12, 2010 11:48 pm    Post subject:
Reply with quote

Frank,

I am at home now and I cant create the sysout now.

Thanks!
Back to top
View user's profile Send private message
main_prem

New User


Joined: 16 Mar 2005
Posts: 8
Location: chennai

PostPosted: Tue Oct 12, 2010 11:51 pm    Post subject:
Reply with quote

To Add more:

Input file B is VSAM-KSDS and huge volume data it contains.
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 Oct 13, 2010 1:23 am    Post subject:
Reply with quote

Quote:
3)Input File B will be in sorted order and there may be duplicates.


Quote:
5)If the file A and B key matched, then record from file A should written to output file(In the above example ouput as 1 and 4 th record)


You need to show an example with duplicates and explain the rules for what you want when file B has duplicates that match/don't match file A.

For example, what would you expect for output if FileA had the records you showed in your example, but File B had these records (with duplicates):

Code:

AAAAAAAAAAAAAAAAAKLJMBGHFT
AAAAAAAAAAAAAAAAAKLJMBGHFU
AAAAAAAAAAAAAAAAAKLJMBGHFV
1111111111111111111LMKPWASZ
2222222222222222222CXZWTYUH
2222222222222222222CXZWTYUI
2222222222222222222CXZWTYUJ
DDDDDDDDDDDDDDDDDZAWERTYN
Back to top
View user's profile Send private message
main_prem

New User


Joined: 16 Mar 2005
Posts: 8
Location: chennai

PostPosted: Wed Oct 13, 2010 10:53 am    Post subject:
Reply with quote

Frank,

I did some analysis in my job and found Input File B will not have any duplicate and that is VSAM-KSDS file.

So now Its clear Input file A and B will not have duplicate INSIDE the file while it coming into ICETOOL operation.

When matching the key fields A and B files, there will be duplicates at that scenario we need to take the File A record and write into output file. we should not take the B file record.

Business behind is, daily Input A file will have come up with some updates that same record will be present in file B already, In that case we need to take the record from file A to output file. Needs to ignore the B file record.

I think, Now if you see my reply posted at "Tue Oct 12, 2010 11:17 pm" will be clear.

Thanks for your quick response!
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 Oct 13, 2010 10:34 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what I think you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=...  input file (FB/195)
//IN2 DD DSN=...  VSAM input file
//OUT DD DSN=...  output file (FB/195)
//SYSIN DD *
  JOINKEYS F1=IN1,FIELDS=(1,17,A)
  JOINKEYS F2=IN2,FIELDS=(1,17,A),TYPE=F
  JOIN UNPAIRED,F1,F2
  REFORMAT FIELDS=(F1:1,95,F2:1,95,?)
  OPTION COPY
  OUTFIL FNAMES=OUT,
    IFTHEN=(WHEN=(191,1,SS,EQ,C'B1'),BUILD=(1,95)),
    IFTHEN=(WHEN=NONE,BUILD=(96,95))
/*
Back to top
View user's profile Send private message
main_prem

New User


Joined: 16 Mar 2005
Posts: 8
Location: chennai

PostPosted: Thu Oct 14, 2010 11:10 am    Post subject:
Reply with quote

Frank,

Thanks a lot!!!!!

You are really Great!!

Its working perfectly..

One question..Can I attain this through ICETOOL? SYSIN keywords are same?

Anyhow. just a question..I think i requirement is done.

Thanks Again!!!!! icon_biggrin.gif
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: Thu Oct 14, 2010 10:59 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job to do the same thing:

Code:

//S2    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=...  input file (FB/195)
//IN2 DD DSN=...  VSAM input file
//OUT DD DSN=...  output file (FB/195)
//TOOLIN DD *
COPY JKFROM USING(CTL1)
/*
//CTL1CNTL DD *
  JOINKEYS F1=IN1,FIELDS=(1,17,A)
  JOINKEYS F2=IN2,FIELDS=(1,17,A),TYPE=F
  JOIN UNPAIRED,F1,F2
  REFORMAT FIELDS=(F1:1,95,F2:1,95,?)
  OPTION COPY
  OUTFIL FNAMES=OUT,
    IFTHEN=(WHEN=(191,1,SS,EQ,C'B1'),BUILD=(1,95)),
    IFTHEN=(WHEN=NONE,BUILD=(96,95))
/*
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