IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to add extra SPACES after the trailer count in DFSORT!!!


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumaresh.M

New User


Joined: 17 Feb 2006
Posts: 64
Location: Bangalore

PostPosted: Thu Sep 10, 2009 12:56 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 10, 2009 5:25 pm
Reply with quote

Can you show your full sortcard where you have used TRAILER1?
Also what is LRECL of input dataset?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Sep 10, 2009 9:05 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 10, 2009 10:34 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Sep 10, 2009 10:46 pm
Reply with quote

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. icon_smile.gif 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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 10, 2009 11:01 pm
Reply with quote

Quote:
when the RECFM is VB.

Yeah right.. I missed it... icon_sad.gif

Thanks Frank
Back to top
View user's profile Send private message
kumaresh.M

New User


Joined: 17 Feb 2006
Posts: 64
Location: Bangalore

PostPosted: Mon Sep 14, 2009 2:27 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top