I am having three fields (A,B,C) in my input file. I want to generate the report if the VALUES in field A is ''1'' the out put should be written into the
field ''B''. If the values of A is ''2'' the put put should be written into the place of B. I need the OUTREC for this.
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
elijarajesh.mf wrote:
I am having three fields (A,B,C) in my input file. I want to generate the report if the VALUES in field A is ''1'' the out put should be written into the
field ''B''. If the values of A is ''2'' the put put should be written into the place of B. I need the OUTREC for this.
What have YOU tried so far and what were the results.
Please post some useful information, including the release level of the product.
RECFM, LRECL of input / output datasets.
Length, position and format of key fields.
Examples of input and output.
Rules for generating the output
Please use the code tags for posting data, output, etc etc
My Input file is having length of 13 bytes and the output file is having 80 bytes which is the Reoprt. In the below Scenario if the 1st byte is having the Value as ""I"" I want to write below the INTERSTATE and other than ''I"" I want to write the output below the INTRASTATE.
Here is my SORT Card:
Code:
SORT FIELDS=(1,5,CH,A,12,2,CH,A)
SUM FIELDS=(6,6,PD)
OUTFIL REMOVECC,
HEADER1=(2:'PAGE ',
8:PAGE,//,
2:'JOB XXXXXX RPT XXXXXXXX',//,
23:'REVENUES FOR XXX',/,
17:'BY STATE BY ROAD FOR',/,
16:'PREPARED ',DATE=(MD4/),' AT ',TIME),
HEADER2=(//,18:'INTERSTATE ','INTRASTATE ',/,
2:'STATE ','ROAD',/,
2:'----------------------------------',
36:'---------------------------'/),
OUTREC=(12,2,5X,2,4,5X,6,6,PD,EDIT=(I,III,IIT.TT),52X)
/*