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
 

 

File comparison: I am facing a problem with space.

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

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Thu Aug 19, 2010 9:48 am    Post subject: File comparison: I am facing a problem with space.
Reply with quote

Hi,

I have a requirement as follows:

File A has following recs:

AAAA XXXXXXXXXXXX
BBBB YYYYYYYYYYYY
CCCC ZZZZZZZZZZZZ
DDDD 111111111111
EEEE 111111111111

File B has following recs:

AAAA
1111
CCCC
2222
EEEE

Now the requirement wants to omit/eliminate the records from FILE A that are present in FILE B. So the output file will have:

BBBB YYYYYYYYYYYY
DDDD 111111111111

Below is the JCL that I have used and it is working fine.

Code:

//ICETOOL  EXEC PGM=ICETOOL                 
//SYSOUT   DD SYSOUT=*                     
//SYSPRINT DD SYSOUT=*                     
//TOOLMSG  DD SYSOUT=*                     
//DFSMSG   DD SYSOUT=*                     
//IN1      DD *                             
AAAA XXXXXXXXXXXX                           
BBBB YYYYYYYYYYYY                           
CCCC ZZZZZZZZZZZZ                           
DDDD 111111111111                           
EEEE 111111111111                           
/*                                         
//IN2      DD *                             
AAAA                                       
1111                                       
CCCC                                       
2222                                       
EEEE                                                       
/*                                                         
//OUT1     DD DSN=&&TEMP01,DISP=(MOD,PASS,DELETE),         
//            RECFM=FB,LRECL=80,SPACE=(TRK,(5,5),RLSE)     
//OUT2     DD DSN=&&TEMP02,DISP=(MOD,PASS,DELETE),         
//            RECFM=FB,LRECL=80,SPACE=(TRK,(5,5),RLSE)     
//OUT3     DD DSN=&&TEMP03,DISP=(MOD,PASS,DELETE),         
//            RECFM=FB,LRECL=80,SPACE=(TRK,(5,5),RLSE)     
//OUT4     DD SYSOUT=*                                     
//TOOLIN   DD *                                             
 COPY FROM(IN1)      TO(OUT1)    USING(CTL1)               
 COPY FROM(IN1)      TO(OUT3)    USING(CTL1)               
 COPY FROM(IN2)      TO(OUT1)    USING(CTL1)               
 SELECT FROM(OUT1)   TO(OUT2)    ON(1,4,CH) NODUPS         
 COPY FROM(OUT2)     TO(OUT3)    USING(CTL1)               
 SELECT FROM(OUT3)   TO(OUT4)    ON(1,4,CH) FIRSTDUP       
/*                                                         
//CTL1CNTL DD *                                             
  SORT FIELDS=COPY                                         
/*


BUT actually my FILE A is of 1340 Bytes and FILE B is of 19 bytes.

FILE A is having 4 million recs and FILE B is having 10 million recs and the above JCL (with LRECL changed) stops working stating that "SORT CAPACITY EXCEEDED".

Can anyone suggest an alternative solution?

Thanks,
Mohit
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: Thu Aug 19, 2010 9:53 am    Post subject:
Reply with quote

Hello,

Give more space in the existing jcl. Also add some larger sortwknn dd statements.

Somewhere there is a message that there was a space problem (possibly an x37 error).
Back to top
View user's profile Send private message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Thu Aug 19, 2010 9:56 am    Post subject:
Reply with quote

Thanks for replying.

I am going to try that out. Will let you know if it works or not.

Also I have a doubt in my mind that is this an optimal way to do this?

Thanks,
Mohit
Back to top
View user's profile Send private message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Thu Aug 19, 2010 6:58 pm    Post subject:
Reply with quote

by assigning larger sortwk dd statements .... it is working fine ... Thanks

However, it is taking a lot of time.

If possible, can you please suggest some idea to improve the performance of the JCL. My improved JCL is as follows:

Code:

//S01S1T  EXEC   PGM=ICETOOL                                                                           
// ALL SORTWKnns here         
//IN1      DD DISP=SHR,DSN=BFYMS1.A1CCSEQ.FALCON.FALF0031     
//OUT1     DD DSN=BFYMS1.A1CCSEQ.FALCON.OUT1,                 
//             DISP=(,CATLG,DELETE),                           
//             DCB=(RECFM=FB,LRECL=1341,BLKSIZE=26820),       
//             SPACE=(CYL,(500,50),RLSE)                       
//TOOLIN   DD *                                               
 COPY FROM(IN1)      TO(OUT1)    USING(CTL1)                   
//CTL1CNTL DD *                                               
  SORT FIELDS=COPY                                             
  INREC FIELDS=(1:1,1340,                                     
             1341:C'A')                                       
//*************************************                       
//S02SRT  EXEC PGM=ICETOOL                                           
//SYSPRINT DD  SYSOUT=*                                             
//TOOLMSG  DD  SYSOUT=*                                             
//DFSMSG   DD  SYSOUT=*                                             
//SYSOUT   DD  SYSOUT=*                                             
// ALL SORTWKnns here                 
//IN1      DD DISP=SHR,DSN=BFYMS1.A1CCSEQ.FALCON.OUT1               
//IN2      DD DISP=SHR,DSN=BFYMS1.A1CC.FP.TEST1.LEFT.NODUPS         
//OUT1     DD DSN=&&TEMP01,DISP=(MOD,PASS,DELETE),                   
//            RECFM=FB,LRECL=1341,SPACE=(CYL,(100,50),RLSE)         
//OUT2     DD DSN=&&TEMP02,DISP=(MOD,PASS,DELETE),                   
//            RECFM=FB,LRECL=1341,SPACE=(CYL,(100,50),RLSE)         
//TOOLIN   DD *                                                     
 COPY FROM(IN1)      TO(OUT1)    USING(CTL1)                         
 COPY FROM(IN2)      TO(OUT1)    USING(CTL1)                         
 SELECT FROM(OUT1)   TO(OUT2)    ON(1,19,CH) NODUPS                 
/*                                                                   
//CTL1CNTL DD *                                               
  SORT FIELDS=COPY                                           
/*                                                           
//SYNCS1  EXEC PGM=SORT                                   
//SYSPRINT DD  SYSOUT=*                                       
//SYSOUT   DD  SYSOUT=*                                       
// ALL SORTWKnns here         
//SORTIN   DD DSN=&&TEMP02,DISP=SHR                           
//SORTOUT  DD DSN=BFYMS1.A1CCSEQ.FALCON.DUPS,                 
//             DISP=(,CATLG,DELETE),                         
//             DCB=(RECFM=FB,LRECL=1340,BLKSIZE=26800),       
//             SPACE=(CYL,(500,50),RLSE)                     
//SYSIN DD *                                                 
 SORT FIELDS=(1,19,CH,A)                                     
 INCLUDE COND=(1341,1,CH,EQ,C'A')                             
 OUTREC FIELDS=(1,1340)                                       
//     

                                                       


Any futher improvement will be really appreciated.

Thanks,
Mohit
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Aug 19, 2010 8:48 pm    Post subject:
Reply with quote

Here is an alternate solution using SyncSort's JOIN feature:
Code:
//SORT1  EXEC PGM=SORT             
//SORTJNF1 DD *                   
AAAA XXXXXXXXXXXX                 
BBBB YYYYYYYYYYYY                 
CCCC ZZZZZZZZZZZZ                 
DDDD 111111111111                 
EEEE 111111111111                 
//SORTJNF2 DD *                   
AAAA                               
1111                               
CCCC                               
2222                               
EEEE                               
//SORTOUT  DD SYSOUT=*             
//SYSOUT   DD SYSOUT=*               
//SYSIN    DD *                       
   JOINKEYS FILES=F1,FIELDS=(1,4,A)
   JOINKEYS FILES=F2,FIELDS=(1,4,A)
   JOIN UNPAIRED,F1,ONLY           
   SORT FIELDS=COPY       
/*         

If SORTJNF2 has many duplicates, then I would recommend swapping the SORTJNF1 and SORTJNF2 DD specifications. You will also need to change your JOIN UNPAIRED statement to reflect F2 instead of F1.
Back to top
View user's profile Send private message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Fri Aug 20, 2010 9:18 am    Post subject:
Reply with quote

Hi Alissa,

Thanks for providing an optimal solution. However, it is throwing the following errors:

1ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 04:43 ON FRI A
0 JOINKEYS FILES=F1,FIELDS=(1,19,A)
£
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
JOINKEYS FILES=F2,FIELDS=(1,19,A)
£
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
JOIN UNPAIRED,F1,ONLY
£
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
SORT FIELDS=COPY
ICE056A 0 SORTIN NOT DEFINED
ICE751I 0 C5-K48846 C6-K90014 C7-K45047 C8-K46331 E7-K48846
ICE052I 3 END OF DFSORT

Can you please advise on this. It looks that SORT utility doesn't work on my system. Or may be there is something else?

Thanks again,
Mohit
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: Fri Aug 20, 2010 9:28 am    Post subject:
Reply with quote

Hello,

You are using a Syncsort solution for a DFSORT execution.

Suggest you look in the DFSORT documentation or search in the forum for the proper syntax for the product you are using (this time).
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Aug 20, 2010 9:52 am    Post subject: Reply to: File comparison: I am facing a problem with space.
Reply with quote

Mohit, looking over previous topics, you've jumped back and forth between Syncsort and DFSORT. Are you in one of those rare companies that actually uses both products? If so, I think you're going to have to find a way to be more specific about which product you're referring to.
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: Fri Aug 20, 2010 9:04 pm    Post subject:
Reply with quote

Mohit,

You can use JOINKEYS with DFSORT if you have your System Programmer install z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009).
Without that PTF, you can't use JOINKEYS with DFSORT.

For complete details on that DFSORT PTF, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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