View previous topic :: View next topic
|
Author |
Message |
kumaresh.M
New User
Joined: 17 Feb 2006 Posts: 64 Location: Bangalore
|
|
|
|
Hi,
i'm using the below mentioned SORT card and producing the trailer count.
TRAILER1=(C'9',COUNT-1=(ZD,LENGTH=10)),
but after the length of 10 i have to populate some extra spaces becase this file is used in one more merge step and the merge step fails because of record length is lesser then in the merge filelds.
MERGE FIELDS=(5,17,CH,A)
15 BYTE VARIABLE RECORDS IS SHORTER THAN 21 BYTE MINIMUM FOR
i used VLSHORT option but according to my design i have to populate some spaces after TRAILER count.
quicker help is much appricated. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Can you show your full sortcard where you have used TRAILER1?
Also what is LRECL of input dataset? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
kumaresh.M,
If you're just trying to increase the length of the trailer record, you can use something like this:
Code: |
TRAILER1=(C'9',COUNT-1=(ZD,LENGTH=10),nX),
|
where n is the number of spaces you want to add.
It that doesn't work or doesn't do what you want, then give more details of exactly what you're trying to do. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Frank wrote: |
If you're just trying to increase the length of the trailer record, you can use something like this:
Code:
Code: |
TRAILER1=(C'9',COUNT-1=(ZD,LENGTH=10),nX), |
|
But I think even if you dont give nX, spaces will be put after count till LRECL,correct me if wrong?
Quote: |
15 BYTE VARIABLE RECORDS IS SHORTER THAN 21 BYTE MINIMUM FOR
|
This problem doesnt seems to be occured by coding of TRAILER1 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
But I think even if you dont give nX, spaces will be put after count till LRECL,correct me if wrong? |
Ok, you're wrong. DFSORT does not pad the trailer record with blanks to the LRECL when the RECFM is VB.
The RECFM here is VB. That means each record has an RDW with a record length. When DFSORT writes the trailer record, it determines the length of the record and puts that in the RDW. So, for example, the trailer record might look like this:
Code: |
Len|Data
15 90000000012
|
That's a 15-byte record, so it could cause that error message.
If you add blanks to the end of the trailer record, then DFSORT adjusts the length of the record accordingly. So, for example, if you add 6 blanks (b) the record would look like this:
Code: |
Len|Data
21 90000000012bbbbbb
|
That's a 21-byte record, so it would not cause that error message.
Of course, I don't know what else is going on here since the OP didn't show the complete job, but adding blanks in TRAILER1 will increase the length of the trailer record to include the added blanks (and only the added blanks). |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Quote: |
when the RECFM is VB.
|
Yeah right.. I missed it...
Thanks Frank |
|
Back to top |
|
|
kumaresh.M
New User
Joined: 17 Feb 2006 Posts: 64 Location: Bangalore
|
|
|
|
Hi Frank,
Sorry for the late reply,
i populated the spaces same like how you mentioned its working as expected.
Thanks a lot for your keane support.
Thanks and regards,
kumaresh.M |
|
Back to top |
|
|
|