File Header
Parameter(Assume value of this is X) Header
Parameter Record-1
Parameter Record-2
Parameter Record-3
99999 Followed by the current date and '3'[This is the record count for this parameter]
Parameter(Assume value of this is Y) Header
Parameter Record-1
Parameter Record-2
Parameter Record-3
Parameter Record-4
99999 Followed by the current date and '4'[This is the record count for this parameter]
Parameter(Assume value of this is Y) Header
Parameter Record-1
Parameter Record-2
99999 Followed by the current date and '2'[This is the record count for this parameter]
File Trailer
Output file when Parameter X is chosen should look like
File Header
Parameter(Assume value of this is X) Header
Parameter Record-1
Parameter Record-2
Parameter Record-3
99999 Followed by the current date and '3'[This is the record count for this parameter]
File Trailer
I was able to copy the file[File header, parameter header,parameter records and File trailer] using INCLUDE conditions. But the problem is coming with the parameter trailer[Here 99999]. Is it possible to include the trailer too in the output file?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Please post the INCLUDE statement you used.
Please post an example of your actual input records and expected output records. (e.g. File Header does not tell us what the record actually looks like - show what the record actually looks like).
Please note that:
TTTTTTTFILEHDR is the file header
TTTTTTTFILEDST is the parameter header
999999 is the parameter trailer
TTTTTTTFILETRL is the file trailer
When i give parameter as XYZ(column 24 to 3 bytes in parameter header) and MO(column 28 to 2 bytes in parameter header) and A(column 30 to 1 in parameter header) are given:
OPTION COPY
INCLUDE COND=(1,14,CH,EQ,C'TTTTTTTFILEHDR',OR,
1,14,CH,EQ,C'TTTTTTTFILEHDR',OR,
10,3,CH,EQ,C'XYZ',OR,
(24,3,CH,EQ,C'XYZ',AND,28,2,CH,EQ,C'MO',AND,30,1,CH,EQ,C'A'),OR,
1,6,CH,EQ,C'999999')
For the current input i was getting 2 '999999' parameter trailer records in the output file where as i should be getting only one.
The RECFM is FB and lrecl is 458.
Please shoot if you have any more questions?
Please note that at any point, there can numerous parameter headers and trailers. I just gave an example of an input file which has just 2 parameter headers. And if you closely observe at the parameter records, the record number is specified at 46th column.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I suspect there's more to this requirement than you're saying. Are you trying to pick a particular group of records, or particular groups of records, by specifying the parameter? For example, might you want to select the third group (e.g. QRS) and the fifth group (e.g. NMN)?
I would guess that you can use the technique shown in the "Include or omit groups of records" Smart DFSORT Trick at:
There is nothing more to this requirement. I mean, in any instance we would like to fetch only one parameter.
Quote:
For example, might you want to select the third group (e.g. QRS) and the fifth group (e.g. NMN)?
This is not a part of our requirement. I hope i'm clear.
To sum it up, when a parameter is passed[Ex:QRS, let it be third group,MO and A], Output file should like:
Code:
TTTTFile header
QRS Parameter Header
QRS Parameter records
9999 Trailer with number of parameter records
TTTTFile Trailer
The main prob where u r facing is the trailer(9999) record.
So What i could suggest is have an intermediate step to get the records that satisfy the parameter condition and write it in to one file.
Step1. So if this is the I/P
Code:
TTTTFile header
QRS Parameter Header
QRS Parameter records
9999 Trailer with number of parameter records
TTTTFile Trailer
after the selecting only the QRS records, O/P should cintain
Code:
QRS Parameter Header
QRS Parameter records
Step2. Now u take this O/P and count the no. of records and punch the record trailer(99999 followed by date and count)
Step3. Add the FIle header and trailer
I got the following error when i used EXEC PGM=ICETOOL,
Code:
ACC20210-E ADDVOL FOR DD=T1 DSN=SYS07095.T001106.RA000.DP8961FC.T1.H05
ACC20625-E DCB IS USING EXCP
IEC030I B37-04,IFG0554A,DP8961FC,DUMMYSRT,T1,5008,PAH008,SYS07095.T0011
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=B37 REASON CODE=00000004
TIME=00.11.13 SEQ=15895 CPU=0000 ASID=0349
PSW AT TIME OF ERROR 075C1000 80E31CDE ILC 2 INTC 0D
NO ACTIVE MODULE FOUND
I was unable to figure out the error. The job abended with SB37.
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
I found this in about 30 seconds by clicking on the "Manuals" link at the top of the page, and then looking at the MVS SYSTEMS CODES book.
I found this in under 30 second by clicking the manuals link at the top of the page and then looking at the MVS SYSTEMS CODES book.
B37
Explanation: The error was detected by the end-of-volume routine.
This system completion code is accompanied by message IEC030I. Refer
to the explanation of message IEC030I for complete information about
the task that was ended and for an explanation of the return code (rc
in the message text) in register 15.
Source: DFSMSdfp
Application Programmer Response: Respond as indicated for message
IEC030I.
System Programmer Response: If the error recurs and the program is
not in error, look at the messages in the job log for more
information. Search problem reporting data bases for a fix for the
problem. If no fix exists, contact the IBM Support Center. Provide
the JCL and the program listing for the job.