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
 

 

Problem in writing to output.

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

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Thu Dec 17, 2009 8:03 pm    Post subject: Problem in writing to output.
Reply with quote

Hi all,

I have two input file,

File 1:

Code:


001 12345678
001 23456789
001 32145671



File 2:

Code:


001 12345678
001 23456712
001 23456712
001 12342344



Required Output :

Code:


001 23456712
001 23456712
001 12342344



i'm using this Icetool step,

Code:


//STEP001  EXEC  PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN1      DD *                                                       
001 12345678                                                           
001 23456789                                                           
001 32145671                                                           
/*                                                                     
//IN2      DD *                                                       
001 12345678                                                           
001 23456712                                                           
001 23456712                                                           
001 12342344                                                           
/*                                                                     
//T1       DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(MOD,PASS)   
//OUT      DD SYSOUT=*                                                 
//TOOLIN   DD *                                                       
COPY FROM(IN1) TO(T1) USING(CTL1)                                     
COPY FROM(IN2) TO(T1) USING(CTL2)                                     
SELECT FROM(T1) TO(OUT) ON(4,8,CH) NODUPS USING(CTL3)                 
/*                                                                     
//CTL1CNTL DD *                                                       
  INREC OVERLAY=(81:C'1')                                             
/*                                                                     
//CTL2CNTL DD *                                                       
  INREC OVERLAY=(81:C'2')                                             
/*                                                                     
//CTL3CNTL DD *                                                       
  OUTFIL FNAMES=OUT,INCLUDE=(81,1,CH,EQ,C'2'),                         
  BUILD=(1,80)                                                         
/*                                                                     




SUGGEST ME WHERE I'M GOING WRONG.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 17, 2009 8:31 pm    Post subject:
Reply with quote

Please take some time and think about what we might need to help you.

What are the rules for the data being included into the required output file.
What are you actually getting in your output file.
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Thu Dec 17, 2009 8:42 pm    Post subject:
Reply with quote

HI all,

Sorry for not explaining the condition.

If the eight digit starting from Pos - 5 is present in file 2 but not in File 1. I need to write it to the output.

Even i have to write the duplicates if any ( Example 23456712 appears twice/thrice) in file 2 but not in file 1.I need to write it to the output.

Let me know if i'm confusing.
Back to top
View user's profile Send private message
lalitsharma_77

New User


Joined: 29 Nov 2007
Posts: 10
Location: Pune

PostPosted: Thu Dec 17, 2009 11:40 pm    Post subject:
Reply with quote

Hi Vineshwaran,

I am not sure whether JOINKEYS PTF is installed in your shop or not. If yes then the following DFSORT job will give you the required result.

Code:

//STEP010 EXEC PGM=SORT             
//SORTOUT  DD SYSOUT=*               
//SYSOUT   DD SYSOUT=*               
//SORTJNF1 DD *                     
001 12345678                         
001 23456789                         
001 32145671                         
/*                                   
//SORTJNF2 DD *                     
001 12345678                         
001 23456712                         
001 23456712                         
001 12342344                         
/*                                   
//SYSIN    DD *                     
  JOINKEYS FILE=F1,FIELDS=(5,8,A)   
  JOINKEYS FILE=F2,FIELDS=(5,8,A)   
  JOIN UNPAIRED,F2,ONLY             
  SORT FIELDS=(5,8,CH,D)             
/*     


Output::

Code:

001 23456712
001 23456712
001 12342344                   


Thanks
Lalit
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Mon Dec 21, 2009 12:14 pm    Post subject:
Reply with quote

Hi lalit,

Sorry,JOINKEYS PTF is not installed in my system.

I'm still struck up with this icon_sad.gif icon_sad.gif
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Mon Dec 21, 2009 3:10 pm    Post subject: Reply to: Problem in writing to output.
Reply with quote

I am not sure if this can achieved using SELECT operator, but try this solution using SPLICE operator:
Code:
//STEP001  EXEC  PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN1      DD *
001 12345678
001 23456789
001 32145671
/*
//IN2      DD *
001 12345678
001 23456712
001 23456712
001 12342344
/*
//T1       DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(MOD,PASS)
//OUT      DD SYSOUT=*
//TOOLIN   DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(5,8,CH) WITH(82,1) -
 KEEPBASE KEEPNODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(81:C'11')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(81:C'22')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(81,2,CH,EQ,C'22'),
  BUILD=(1,80)
/*
Back to top
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Mon Dec 21, 2009 3:25 pm    Post subject:
Reply with quote

Yes Ligo solution should work.

Vigneshwaran,
Just for info if you had referred manuals under Icetool you might have easily found out solution your self. The requirement is explained as example there under SLICE subtopic.

Regards,
Surya
Back to top
View user's profile Send private message
Vigneshwaran S
Warnings : 1

New User


Joined: 10 Dec 2008
Posts: 60
Location: Chennai

PostPosted: Mon Dec 21, 2009 3:29 pm    Post subject:
Reply with quote

Hi all,

Yes Lijo Solution is working.

Yes Surya i jus now looking into a ICETOOL manual and i could see it.
May be i was breaking my mind to find solution using SELECT operation( Single Direction Thinking)

Thanks all fr postiong.
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


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