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

using EDITS in trailer


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

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Thu Aug 21, 2008 1:37 pm
Reply with quote

Hi,
I've trailer records in my file as below..
I want to have the amount fields in STTTTTTTTTT.TTT format. Can i have EDIT clause in the TRAILER line???


TRAILER1=('NEWCT,''',COUNT=(M11,LENGTH=8),'''',/,
'TOT1,',''TOTAL=(66,11,ZD,M11)'''',/,
'TOT2,',''TOTAL=(77,11,ZD,M11)'''')

Thanks..
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Aug 21, 2008 4:13 pm
Reply with quote

Anand,



Quote:
Can i have EDIT clause in the TRAILER line???


Yes, you can.

But there is no need of coding the EDIT clause when you have the pre-defined edit masks coded in the trailer.

Quote:
'TOT1,',''TOTAL=(66,11,ZD,M11)''''


In the above case you have coded a pre-defined edit mask M11 which has the pattern TTTTTTTTTTTTTTT.

Quote:
I want to have the amount fields in STTTTTTTTTT.TTT format



I doubt if there is a pre-defined mask for the pattern STTTTTTTTTT.TTT. For this, remove M11 and code the edit clause.
Back to top
View user's profile Send private message
lanand_hps

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Thu Aug 21, 2008 5:46 pm
Reply with quote

There is no pre-defined mask for STTTTTTTTTT.TTT
'TOT1,''',TOTAL=(66,11,ZD,STTTTTTTTTTTTTT) is not working.
'TOT1,''',TOTAL=(66,11,ZD,edit=STTTTTTTTTTTTTT) is also not working icon_cry.gif
Back to top
View user's profile Send private message
lanand_hps

New User


Joined: 05 Dec 2007
Posts: 82
Location: chennai

PostPosted: Thu Aug 21, 2008 6:24 pm
Reply with quote

'TOT1,''',TOTAL=(66,11,ZD,EDIT=(STTTTTTTTTT.TTT),SIGNS=(+,-)),'''',/,
'TOT2,''',TOTAL=(77,11,ZD,EDIT=(STTTTTTTTTT.TTT),SIGNS=(+,-)),'''') is working. Not sure if SIGNS is compulsary..
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 Aug 21, 2008 8:58 pm
Reply with quote

Yes, if you have S (sign) in the EDIT pattern, you must have SIGNS to define the signs to be used for S.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Aug 22, 2008 11:26 am
Reply with quote

Lanand,

Good that it is working?

Frank,

Quote:
you must have SIGNS to define the signs to be used for S.


I have a doubt here. Don't we use SIGNS=() to override or set the output signs? I was under an assumption that if SIGNS is not coded default values will be picked up. Isn't it true?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Aug 22, 2008 12:26 pm
Reply with quote

Aaru,

This is what DFSORT manual says.

Quote:
If SIGNS is specified, an S in the first or last character of the pattern is treated as a sign; an S anywhere else in the pattern is treated as the letter S.

If SIGNS is not specified, an S anywhere in the pattern is treated as the letter S.


Thanks,
Arun
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Aug 22, 2008 12:44 pm
Reply with quote

Thanks Arun, that was useful.
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: Fri Aug 22, 2008 9:35 pm
Reply with quote

The Mn edit masks with signs in the pattern have defaults for the signs as shown in this table:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/TBLOFEDSGN?SHELF=&DT=20060615185603&CASE=&ScrollTOP=TBLOFEDSGN#TBLOFEDSGN

For example, M26 has + and - as the defaults for the signs. You can use SIGNS to override these defaults.

But if you use S in the pattern for EDIT, you must specify the signs with SIGNS - there's no default (well, 'S' is the default but you don't want that).
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Aug 23, 2008 10:08 pm
Reply with quote

That was Perfect frank. Thanks.
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 Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts create rexx edit Macro that edits the... CLIST & REXX 3
No new posts Comparing Header and Trailer. DFSORT/ICETOOL 7
No new posts Adding a trailer with record count an... JCL & VSAM 4
No new posts Build a trailer with total an count SYNCSORT 6
Search our Forums:

Back to Top