Posted: Wed Jan 04, 2006 7:49 am Post subject: Problem in display header and trailer
Hai All,
I am basically trying to generate a report with SORT where in i shoud be having headers one after the other in different lines in the report in the format and at the end of the report a trailer display.
I am getting the following error as below.Can anybody help me out how do i achieve my desired result.Morever how do i take care of the page numbers increasing when the pages exceed more than one ?
Code:
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE230A 0 67 BYTE HEADER/TRAILER RECORD EXCEEDS 10 BYTE LRECL FOR SORTOUT
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Jan 04, 2006 8:09 am Post subject:
Mfuser,
The messages are self explanatory. your OUTREC fields are only creating a file of 10 bytes length, but you are specifying the date and page fields to start at pos 41 which is NOT possible.
So you need to change your OUTREC FIELDS to accomadate the additional fields. So change your sort card to the following. Btw you don't have to hardcode the date/time/page in your sort card. you can use the system defined variables &date/&time/&page for current date/time and page numbers respectively.
HEADER1 is the report header and will give you a page with those lines. HEADER2 is the page header and will give you those lines at the top of every page starting with the second page (after the header1 page). Is that what you want or did you really want the PAGE literal as part of HEADER2? _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
I have understood the steps from your answers and my concepts are clear and i am able to write Control statements.I have few queries:
1)If i would like to take care of page numbers incremental ,how do i do that ,can we make use of line counter if it exceeds 50 lines, the page should be incremented to 2.
2)the date format is mm/dd/yy ,if i want the format to be mm/dd/20yy how can it be achieved
3)if i want to insert a blank line after the headers how can it be achieved
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Jan 04, 2006 3:00 pm Post subject:
mfuser,
Quote:
1)If i would like to take care of page numbers incremental ,how do i do that ,can we make use of line counter if it exceeds 50 lines, the page should be incremented to 2.
You need to use HEADER2 if you want the header on every page. For controlling the no: of line per page on the report you can use the LINES parameter. you can use the PAGE parm for auto increment of the page number. remember to count the header lines also as a part of the total lines/page.
Quote:
2)the date format is mm/dd/yy ,if i want the format to be mm/dd/20yy how can it be achieved
Simple you can use the DATE parm and specify the pattern i.e
ex:
Code:
41:C'DATE: ',DATE=(MD4/)
this will print the date at 41 pos in the MM/DD/CCYY format.
Quote:
3)if i want to insert a blank line after the headers how can it be achieved
If you want blank lines to appear in headers and trailers, you can use n/.
where n is the no: of lines you want.
Ex: if you want three blank lines then you can specify 3/
run this sample job and take a look at the sortout after completion
a)1 line for Page,1 line for Date,1 line for Time and after that u are using 41:C'TIME: ',TIME,2/, which means u should leave two lines after TIME which is being not done .
b)Is n/ is used to have blank lines after printing the desired line.
c)Moreover with the OUTFIL LINES=7 means after completing six lines increment the page counter and write the headers.
d)And before writing 'FINISH' u are using TRAILER1=(2/,41:C'FINISH') u are expecting 2 lines to be blank before 'FINISH' which is not happening.
5)Why is that we are mentioing 41 st column to start with ,but it is starting from 42 column is it because of Carriage control character and can it be removed.
[/color]
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Jan 05, 2006 8:50 am Post subject:
Quote:
a)1 line for Page,1 line for Date,1 line for Time and after that u are using 41:C'TIME: ',TIME,2/, which means u should leave two lines after TIME which is being not done .
b)Is n/ is used to have blank lines after printing the desired line.
Here is a detailed explanation straight from the DFSORT manual.
Code:
.../ or n/
Blank records or a new record. A new output record is to be started with or without intervening blank output records. If /.../ or n/ is specified at the beginning or end of OUTREC, n blank output records are to be produced. If /.../ or n/ is specified in the middle of OUTREC, n-1 blank output records are to be produced (thus, / or 1/ indicates a new output record with no intervening blank output records).
At least one input field or separation field must be specified if you use /.../ or n/. For example, OUTREC=(//) is not allowed, whereas OUTREC=(//X) is allowed.
Either n/ (for example, 5/) or multiple /'s (for example, /////) can be used. n can range from 1 to 255. If n is omitted, 1 is used.
Blanks
Blanks
Field 2 contains 222
Field 1 contains 111
Note that four OUTFIL output records are produced for each OUTFIL input record.
Quote:
c)Moreover with the OUTFIL LINES=7 means after completing six lines increment the page counter and write the headers.
What makes you think that ? Lines=7 means to write 7 lines/page counting the headers also.
Quote:
d)And before writing 'FINISH' u are using TRAILER1=(2/,41:C'FINISH') u are expecting 2 lines to be blank before 'FINISH' which is not happening.
Refer to the first answer above.
Quote:
5)Why is that we are mentioing 41 st column to start with ,but it is starting from 42 column is it because of Carriage control character and can it be removed.
Yes it is because of the carriage control character since you are using reporting features(header,trailer....). you can remove the carriage control using the parm REMOVECC
6. I am creating a seperate topic for this as it is totally different question.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum