|
View previous topic :: View next topic
|
| Author |
Message |
aripallig
New User
.jpg)
Joined: 05 Jul 2005 Posts: 23 Location: india
|
|
|
|
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 |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
aripallig
New User
.jpg)
Joined: 05 Jul 2005 Posts: 23 Location: india
|
|
|
|
| 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 |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
aripallig
New User
.jpg)
Joined: 05 Jul 2005 Posts: 23 Location: india
|
|
|
|
| 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 |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|