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
 

 

How to realize N:N match in JCL

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

New User


Joined: 27 May 2010
Posts: 43
Location: da lian.china

PostPosted: Tue Feb 22, 2011 8:55 pm    Post subject: How to realize N:N match in JCL
Reply with quote

hello:

How to realize N:N match in jcl? Really in a hurry , waiting for your help and answer.Thank you so much !

input file1

Code:
userid           project_code    action
MARY             T12340           ALTER
JIM                T12340           READ
LUCY              T23450           UPDATE

input file2

Code:
project_code       sub_project_code
T12340                 U11110
T12340                 U22220
T23450                 U33330
T23450                 U44440


anticipate result
Code:
userid           project_code    action
MARY             U11110          ALTER
MARY             U22220          ALTER
JIM                U11110          READ
JIM                U22220          READ
LUCY             U33330          UPDATE
LUCY             U44440          UPDATE
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Feb 22, 2011 8:58 pm    Post subject: Reply to: How to realize N:N match in JCL
Reply with quote

Quote:
Really in a hurry ,

well what a pity!
remember replying on a forum is
on voluntary basis
on our own time
free of charge
if You have time constraints You are strongly advised to use the services of a paid consultant icon_evil.gif
Back to top
View user's profile Send private message
liying

New User


Joined: 27 May 2010
Posts: 43
Location: da lian.china

PostPosted: Tue Feb 22, 2011 9:06 pm    Post subject: Re: Reply to: How to realize N:N match in JCL
Reply with quote

enrico-sorichetti wrote:
Quote:
Really in a hurry ,

well what a pity!
remember replying on a forum is
on voluntary basis
on our own time
free of charge
if You have time constraints You are strongly advised to use the services of a paid consultant icon_evil.gif


I am terribly sorry for my improper words. I promise I will not use words like this agian.Thank you so much for your advise. icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Feb 22, 2011 9:08 pm    Post subject: Reply to: How to realize N:N match in JCL
Reply with quote

Your sort product might provide the solution...

DFSORT questions get better reply on the DFSORT/ICETOOL section where the answers are provided by DFSORT developers

SYCNSORT question are handled here ( JCL section )

Run the code below and post the JES SYSOUT element so that we can see the sort product and release level that you have installed.

Code:
//FINDOUT  EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
liying

New User


Joined: 27 May 2010
Posts: 43
Location: da lian.china

PostPosted: Wed Feb 23, 2011 7:59 am    Post subject: Re: Reply to: How to realize N:N match in JCL
Reply with quote

enrico-sorichetti wrote:
Your sort product might provide the solution...

DFSORT questions get better reply on the DFSORT/ICETOOL section where the answers are provided by DFSORT developers

SYCNSORT question are handled here ( JCL section )

Run the code below and post the JES SYSOUT element so that we can see the sort product and release level that you have installed.

Code:
//FINDOUT  EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY


I am sorry that yesterday it is too late that I received the mail that you have comment to my problem this morning.I have test as you have taught me, and have paste the version information in the below.

Code:
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 11:18 ON WED FE
           SORT FIELDS=COPY                                                     
ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E9-K51707 C9-BASE   E5-K55337
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED
ICE088I 0 EV615BBA.STEP0020.A       , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)                                 
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)                           
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=450560,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=8      ,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
ICE235I 0 OPTIONS: NULLOUT=RC0                                                 
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT                                   
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN                                   
ICE751I 1 EF-K49535 F0-K49038 E8-K51707                                         
ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB                           
ICE055I 0 INSERT 0, DELETE 0                                                   
ICE054I 0 RECORDS - IN: 1, OUT: 1                                               
ICE052I 0 END OF DFSORT                                                         
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 23, 2011 8:02 am    Post subject:
Reply with quote

Hello,

The "ICE" messages show that your system is running DFSORT. Your topic has been moved to the DFSORT part of the forum.
Back to top
View user's profile Send private message
liying

New User


Joined: 27 May 2010
Posts: 43
Location: da lian.china

PostPosted: Wed Feb 23, 2011 8:06 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

The "ICE" messages show that your system is running DFSORT. Your topic has been moved to the DFSORT part of the forum.


ok,got it.thank you for your contact.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Feb 24, 2011 12:11 am    Post subject: Reply to: How to realize N:N match in JCL
Reply with quote

liying,

Use the following DFSORT JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//INA      DD *                                             
----+----1----+----2----+----3----+----4----+----5----+----6
MARY             T12340           ALTER                     
JIM              T12340           READ                     
LUCY             T23450           UPDATE                   
//INB      DD *                                             
T12340                 U11110                               
T12340                 U22220                               
T23450                 U33330                               
T23450                 U44440                               
//SORTOUT  DD SYSOUT=*                                     
//SYSIN    DD *                                             
  OPTION COPY                                               
  JOINKEYS F1=INA,FIELDS=(18,6,A)                           
  JOINKEYS F2=INB,FIELDS=(01,6,A)                           
  REFORMAT FIELDS=(F1:1,17,F2:24,6,F1:24,57)               
//*


The output from the above job is
Code:

MARY             U11110           ALTER   
MARY             U22220           ALTER   
JIM              U11110           READ     
JIM              U22220           READ     
LUCY             U33330           UPDATE   
LUCY             U44440           UPDATE   
Back to top
View user's profile Send private message
liying

New User


Joined: 27 May 2010
Posts: 43
Location: da lian.china

PostPosted: Thu Feb 24, 2011 12:16 pm    Post subject: Re: Reply to: How to realize N:N match in JCL
Reply with quote

Thank you so much for your help. It is really helpful.And may I ask another question? If there are data in file INA that can not match with file INB, how can I put it to output file without any changes?

for example
INA
Code:

----+----1----+----2----+----3----+----4----+----5----+----6
MARY             T12340           ALTER                     
JIM              T12340           READ                     
LUCY             T23450           UPDATE       
LIYING           T00000           ALL           


INB
Code:
                         
T12340                 U11110                               
T12340                 U22220                               
T23450                 U33330                               
T23450                 U44440                               

The anticipate result
Code:

MARY             U11110           ALTER   
MARY             U22220           ALTER   
JIM              U11110           READ     
JIM              U22220           READ     
LUCY             U33330           UPDATE   
LUCY             U44440           UPDATE   
LIYING           T00000           ALL
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Feb 24, 2011 11:34 pm    Post subject:
Reply with quote

liying,

Use the following control cards
Code:

//SYSIN    DD *                                                         
  OPTION COPY                                                           
  JOINKEYS F1=INA,FIELDS=(18,6,A)                                       
  JOINKEYS F2=INB,FIELDS=(01,6,A)                                       
  JOIN UNPAIRED,F1                                                     
  REFORMAT FIELDS=(F1:1,80,?,F2:24,6)                                   
  INREC IFOUTLEN=80,IFTHEN=(WHEN=(81,1,CH,EQ,C'B'),OVERLAY=(18:82,6))   
//*
Back to top
View user's profile Send private message
liying

New User


Joined: 27 May 2010
Posts: 43
Location: da lian.china

PostPosted: Fri Feb 25, 2011 10:23 am    Post subject:
Reply with quote

It is amazing.Thank you so much for helping me. icon_biggrin.gif
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 Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts DFSORT to match two files and write John F Dutcher DFSORT/ICETOOL 6 Thu May 12, 2016 5:17 pm
No new posts Match and NoMatch using Sort raj_mainframe08 DFSORT/ICETOOL 1 Sat Feb 06, 2016 4:48 pm
No new posts MATCH records in 2 files rally DFSORT/ICETOOL 5 Tue Oct 13, 2015 1:40 pm
No new posts IFTHEN & BUILD - If keyword match... Roach_MF DFSORT/ICETOOL 4 Wed Mar 18, 2015 1:21 am


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