View previous topic :: View next topic
|
Author |
Message |
solusish
New User
Joined: 15 Jan 2012 Posts: 4 Location: India
|
|
|
|
hi,
For one of our Easytrieve programs we need to use the REPORT option but the output file should be a FB dataset instead of a FBA.
We are defining output dataset with
OUT-FILE2 PRINTER RPTOUT
and we use the REPORT statement as below:
REPORT REPORT1 PRINTER RPTOUT NOHEADING NOPAGE NODATE
The ddname RPTOUT is defined in the JCL as FB and with LRECL 210 but yet we get a FBA with 1's and 0's in the first column. This file will be eventually sent as a email attachment(.txt file) and the 1st column zeroes and 1's do not look good.
I tried go through the syntax in the EZT manual and googled for related to this and found the below, but unfortunately cannot make a solution of it.
ibmmainframes.com/viewtopic.php?t=61647
Can someone please help on this if they have come across similar scenario. Thanks in advance!! |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Does your FILE statement even compile?
Why do you need the REPORT statement?
What happened when you put a RECFM=FB on the DD for the report file?
Please also show your entire REPORT through to and including LINE and any report-procedures you may have. In the Code tags. |
|
Back to top |
|
|
solusish
New User
Joined: 15 Jan 2012 Posts: 4 Location: India
|
|
|
|
Thanks for responding Bill.
Does your FILE statement even compile?
Yes. The FILE statement compiles fine - infact whole pgm works fine except that a FBA instead FB is created.
I missed out the keyword FILE above:
FILE OUT-FILE2 PRINTER RPTOUT
Why do you need the REPORT statement?
As per the standards set in the department.
What happened when you put a RECFM=FB on the DD for the report file?
Using RECFM=FM in the jcl with LRECL 210 still produces a FBA file with same LRECL.
Do you need to see the sample report (output)?
I can get the report-procedure. I was hoping to know if at all a FB can be created after use of REPORT statement.
Thanks much for the help Bill. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
The link you provided was for a program not using the capabilities of REPORT, but still using REPORT. Let's assume yours is different.
If Easytrieve Plus does not allow override through the JCL., then you are going to have to trap the output and write it yourself.
This is an example of a "FILE EXIT" for a PRINTER file. You should be able to adapt this to write out your F 133 record. CLOSE and exit when you get the end-of-processing indication and exit, OPEN the output first time write the your and exit.
In your LINKAGE SECTION define an 01, with two subordinate items, a FILLER of length one, and your data of 132.
Your other possibility is to "post-process" your report output to read an FA and write an F.
This could be with Easytrieve Plus or with SORT or anything else you like.
Peter I think has previously posted an example in Easytrieve Plus. SORT would be:
Code: |
OPTION COPY
INREC BUILD=(2,132) |
|
|
Back to top |
|
|
solusish
New User
Joined: 15 Jan 2012 Posts: 4 Location: India
|
|
|
|
Thanks Bill! We have been using the SORT to eliminate the first column in a separate step.
Your suggestion to "FILE EXIT" for a PRINTER file. You should be able to adapt this to write out your F 133 record. CLOSE and exit when you get the end-of-processing indication and exit, OPEN the output first time write the your and exit. " is what i will try out .
We wanted to try something different. I will let you know how it goes
Again, appreciate your help!! Shall keep you posted.
Thanks! |
|
Back to top |
|
|
|