View previous topic :: View next topic
|
Author |
Message |
poshabrar
New User
Joined: 10 Jul 2006 Posts: 23
|
|
|
|
I have an ezytrieve program which creates REPORT in this format
COMPANY NAME
ADDRESS
1234 -------->:employee ID:
Current EMployee salary = 2000
Hike given=500
1235 -------->:employee ID:
Current EMployee salary = 2500
Hike given=800
.
.
.
.
it contains N records of this format in the report.
My objective is to pick the data from this report and write it so some sequential file(PS)
The resulting PS should look like
1234 2000 500
1235 2500 800
.
.
.
.
Can any one suggest how to accomplish this.
I will really appreciate if you could write the code for this task |
|
Back to top |
|
|
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
can you please post a snapshot of the report generated by the EZYtrive Module? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Check your manual, there are control points in report generation available for detail lines, you can output from there. |
|
Back to top |
|
|
poshabrar
New User
Joined: 10 Jul 2006 Posts: 23
|
|
|
|
Hi Willaim,
Can you please be more specific, I am trying this out for the first time. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Have you check your manuals? I think the application guide might give the best example..... |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
If the report file created by your EZT code is not used by any one, then you can change your EZT code to write to an output file in whatever format is required, or create new output file and create the requred format. |
|
Back to top |
|
|
poshabrar
New User
Joined: 10 Jul 2006 Posts: 23
|
|
|
|
Will I just have to redirect the output by changing the SYSOUT in my JCL? what changes do i have to make in my ezytrieve program.? |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
If you want to create one more output file with just required data , then you got to make changes in your code to write to new output file. |
|
Back to top |
|
|
poshabrar
New User
Joined: 10 Jul 2006 Posts: 23
|
|
|
|
Devzee,
Can you please pass on some sample code. I am very new to ezytrieve and I have no manuals to go thru.. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
By looking at any of your existing code you can easily make changes.
1. Write 1 line of File declaration
2. And then before or after current PRINT statement move to output area, and do PUT
3. In JCL code a dd name for your new file name
Even If you are new you can look at the code and can easily understand Easytrieve syntax and flow.. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
poshabrar wrote: |
I am very new to ezytrieve and I have no manuals to go thru.. |
Well, why didn't you say so....
|
|
Back to top |
|
|
poshabrar
New User
Joined: 10 Jul 2006 Posts: 23
|
|
|
|
On your suggestion I have declared a file with name OUTCLT.
PARM SSID('DB2T')
FILE OUTCLT
FILE OUTRPT PRINTER
I have included the PUT stmt before the Print stmt
PUT OUTCLT
PRINT MADRPT
When I compile the program it shows up this error
76 *******A001 FILE OPEN ERROR - OUTCLT
*******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR
Please advice. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Have you coded OUTCLT DD name in JCL ? |
|
Back to top |
|
|
poshabrar
New User
Joined: 10 Jul 2006 Posts: 23
|
|
|
|
YEs i did
And on line 76 in EZYTRIEVE I have the following code
JOB INPUT NULL NAME MAIN-PROCESS START START-PROC
I guess the error message relates to this line. Isn't it? |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
A001 FILE OPEN ERROR - filename
The operating system detected an error while attempting to open the indicated file.
The file remains unopened and the job is terminated.
Validate the
existence and characteristics of the actual file.
Make sure that the characteristics of the file match those parameters specified on the FILE statement.
Done all that? |
|
Back to top |
|
|
poshabrar
New User
Joined: 10 Jul 2006 Posts: 23
|
|
|
|
I have made changes...... But this time it runs with return code of Zero but doesn't write any records to the file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
It may help if you post your jcl and the code that references the new output file. |
|
Back to top |
|
|
|