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
 

 

Operation with 3 files

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

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Wed Oct 15, 2014 6:46 pm    Post subject: Operation with 3 files
Reply with quote

Appreciate all veterans help to solve the problem:

I have 3 files

File 1:
Code:
2014-10-15


File 2:

Code:

SSSS2014-10-15
WWW2014-10-16
AAAA2014-10-17
WWW2014-10-17
BBB2014-10-20


File 3:
Code:
2014-10-17


File 1 and File 3 will have start dates and end dates respectively.

Below is my desired output:
Code:

SSSS2014-10-15
WWW2014-10-16
AAAA2014-10-17
WWW2014-10-17


Basically in my output file , i should have those records which is fall in the start date (file 1 )and end date range (file 2).

This can be solved by a program, but it would be great if we can find a solution . using SORT

Thanks in advance
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Wed Oct 15, 2014 7:23 pm    Post subject: Reply to: Operation with 3 files
Reply with quote

Assuming that you File 1 and File 3 are suitable for contcatenation, one step to read those (start first, end second) and create a symbol/SYMNAMES file sourced with the appropriate value.

Then in the second step, where you process File 2, use the symbols.

Similar to examples here where one "date file" is required, it's just that you have two.
Back to top
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Wed Oct 15, 2014 7:38 pm    Post subject: Re: Reply to: Operation with 3 files
Reply with quote

Bill Woodger wrote:
Assuming that you File 1 and File 3 are suitable for contcatenation, one step to read those (start first, end second) and create a symbol/SYMNAMES file sourced with the appropriate value.

Then in the second step, where you process File 2, use the symbols.

Similar to examples here where one "date file" is required, it's just that you have two.


Thanks Bill, could you please give me the link of the examples you mentioned
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Wed Oct 15, 2014 7:56 pm    Post subject: Reply to: Operation with 3 files
Reply with quote

If you click on DFSORT/ICETOOL immediately above, you'll be taken to that particular forum. There is a Search box. I put "symbols" in and about the fourth result was this.

Follow the links to encounter a post by mistah kurtz.
Back to top
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Wed Oct 15, 2014 7:59 pm    Post subject: Re: Reply to: Operation with 3 files
Reply with quote

Bill Woodger wrote:
If you click on DFSORT/ICETOOL immediately above, you'll be taken to that particular forum. There is a Search box. I put "symbols" in and about the fourth result was this.

Follow the links to encounter a post by mistah kurtz.


Thanks a lot
Back to top
View user's profile Send private message
Gabriel Araujo Alves

New User


Joined: 20 Jul 2010
Posts: 38
Location: Brazil

PostPosted: Thu Oct 16, 2014 2:21 am    Post subject:
Reply with quote

sun_job,

i tried this, but it is missing the last record. Sorry but i have no more time to think about. Hope it helps. I am concatenating the first ans last file in the Sortin.

Code:

//*********************************************************************
//STEP1       EXEC PGM=SORT                                           
//SYSOUT      DD SYSOUT=*                                             
//SYSPRINT    DD SYSOUT=*                                             
//SORTIN      DD *                                                     
2014-10-15                                                             
2014-10-17                                                             
//SORTOUT     DD DSN=&&TEMP,UNIT=VIO,DISP=(,CATLG)                     
//SYSIN       DD *                                                     
 SORT FIELDS=COPY                                                     
 OUTFIL REMOVECC,NODETAIL,                                             
   TRAILER1=(C' SORT FIELDS=(COPY) ',/,                               
   C' INREC IFTHEN=(WHEN=GROUP,',/,                                   
   C' BEGIN=(5,10,UFF,EQ,',MIN(01,10,UFF,TO=ZD,LENGTH=08),C'),',/,     
   C' PUSH=(30:ID=1), ',/,                                             
   C' END=(5,10,UFF,EQ,',MAX(01,10,UFF,TO=ZD,LENGTH=08),C'))',/,       
   C' OUTFIL INCLUDE=(30,01,ZD,EQ,1),BUILD=(01,14)')                   
/*                                                                     
//*********************************************************************
//STEP2       EXEC PGM=SORT                                           
//SYSOUT      DD SYSOUT=*                                             
//SYSPRINT    DD SYSOUT=*                                             
//SORTIN      DD *                                                     
SSSS2014-10-15                                                         
WWW2014-10-16                                                         
AAAA2014-10-17                                                         
WWW2014-10-17                                                         
BBB2014-10-20                                                         
//SORTOUT     DD SYSOUT=*                                             
//SYSIN       DD DSN=*.STEP1.SORTOUT,DISP=(SHR)                       
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
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 Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Joinkeys operation betwen VB and FB file Susanta SYNCSORT 4 Sun Sep 25, 2016 9:49 pm


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