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
 

 

COmplex file matching logic in easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
aripallig

New User


Joined: 05 Jul 2005
Posts: 23
Location: india

PostPosted: Tue Jun 09, 2009 5:39 pm    Post subject: COmplex file matching logic in easytrieve
Reply with quote

Hi All,

I need the help in doing the below request from the client by using easytrieve :

Design is as follows:

1 . Master file
2. Download file with Key as indicator
3. Out put file

solution is first i need to copy the entire Master file to output file then based upon the indicatior from download file in step2 i need to write/delete/update the records in the output file created in step 3.

I coded the file JCL but when i do the copy it is getting over written by the matching logic that i have i have in teh program as below.

Colud some one help we will the correcting the code

FILE OUTPUT01 UPDATE
COPY INPUT01

JOB INPUT INPUT02
IF I2-IBMSP-LOGMAR = 'I'
WRITE OUTPUT01 UPDATE
END-IF

Thanks
Girish
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 Jun 10, 2009 5:56 am    Post subject:
Reply with quote

Hello,

For someone to be able to help, i believe you need to post more complete info.

Why have you chosen to post that small bit of the code? Your topic mentions "matching", but no info about matching (or if it is a problem) has been posted.

What is the jcl for the 3 files in this step?

I do not understand the need to copy the master file and then do some other process based on the "download" file. It may help if you post some sample input (all inputs) and the output you need when that input is precessed. Also, explain the rules for the process.
Back to top
View user's profile Send private message
aripallig

New User


Joined: 05 Jul 2005
Posts: 23
Location: india

PostPosted: Wed Jun 10, 2009 1:43 pm    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

For someone to be able to help, i believe you need to post more complete info.

Why have you chosen to post that small bit of the code? Your topic mentions "matching", but no info about matching (or if it is a problem) has been posted.

What is the jcl for the 3 files in this step?

I do not understand the need to copy the master file and then do some other process based on the "download" file. It may help if you post some sample input (all inputs) and the output you need when that input is precessed. Also, explain the rules for the process.



Hi All,

Here i am putting my complete JCL and the requirements

//JS020 EXEC PGM=EZTPA00,REGION=0M
//***********************************************************
//* MASTER FILE INPUT
//***********************************************************
//INPUT01 DD DSN=TDEAA.DREAT.SSSRES01.EVTHST(0),
// DISP=(SHR,KEEP,KEEP)
//***********************************************************
//* DOWNLOADED FILE FOR COMPARE WITH MASTER FILE
//***********************************************************
//INPUT02 DD DSN=TDEAA.VZRKYP.SSSRES01.EVTHST(0),
// DISP=(SHR,KEEP,KEEP)
//***********************************************************
//* WRITE THE MATCHED RECORDS WITH THE DAILY DOWNLOAD FILE
//***********************************************************

//*********************************************************************
//OUTPUT01 DD DSN=MDEAA.DREAT.SSSRES01.EVTHST1(+1),
// DISP=(NEW,CATLG,DELETE),
// DATACLAS=DCPSFB00,
// LRECL=42,
// MGMTCLAS=MC003608,
// SPACE=(CYL,(10,10),RLSE),
// AVGREC=U
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//EZTVFM DD UNIT=VIO,
// SPACE=(CYL,(100,10))
//SYSIN DD *

FILE INPUT01
I1-FILE 01 18 A
I1-VEH-NUM 01 08 A
I1-BUS-DATE 09 10 A
FILE INPUT02
I2-FILE 01 19 A
I2-VEH-NUM 01 08 A
I2-BUS-DATE 09 10 A
I2-IBMSP-LOGMAR 18 01 A

FILE OUTPUT01 VS UPDATE
O1-FILE 01 42 A
O1-VEH-NUM 01 08 A
O1-BUS-DATE 09 10 A
COPY INPUT01

JOB INPUT INPUT02
IF I2-IBMSP-LOGMAR = 'I'
MOVE I2-VEH-NUM TO O1-VEH-NUM
MOVE I2-BUS-DATE TO O1-BUS-DATE
WRITE OUTPUT01
END-IF

Here the constrain is First copy entire data from INPUT01 to OUTPUT01
Then based on the I2-IBMSP-LOGMAR add/delete/update the OUTPUT01 and store as new file that is output01.

i looking help on this design

thank,
girish
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 Jun 11, 2009 8:22 am    Post subject:
Reply with quote

Hello,

I believe you need to re-think this process. If i understand the requirement (and i may misunderstand), the process needs to read the 2 input files, match them, and create the new output.

It will help if you show some sample records from both input files and the output file that should be created when that sample input is processed.
Back to top
View user's profile Send private message
aripallig

New User


Joined: 05 Jul 2005
Posts: 23
Location: india

PostPosted: Thu Jun 11, 2009 2:48 pm    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

I believe you need to re-think this process. If i understand the requirement (and i may misunderstand), the process needs to read the 2 input files, match them, and create the new output.

It will help if you show some sample records from both input files and the output file that should be created when that sample input is processed.


Hi All,

You are correct, the process is revisited and we came to conclusion that we will work with two files i.,e, one master file one download file.

Now i am looking for the code
1.if the indicator is I write to output
2. if it is U u need to compare with the first input file and second input file based on that i need to write to output
3. if indicator is D i need to compare the second infile with the first one and need to skip those records
4. need to write all the remaining records to the output.

Could you please help on this.

Thanks
Girish
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 Jun 12, 2009 6:45 am    Post subject:
Reply with quote

Hello,

To repeat:
Quote:
It will help if you show some sample records from both input files and the output file that should be created when that sample input is processed.

I'll try to help work on the code but not create it. . .

You may want to talk with someone in your organization that has more experience with Easytrieve also.
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 -> CA Products 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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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