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

Display Signed ZD field


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

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Feb 28, 2019 1:17 am
Reply with quote

I've read the DFSORT manual and tried a variety of edit fields, but just can't get this to work.

I have a field that is one byte and is X'JD'. I want to use the OUTFIL OUTREC parameters to display this as '1-'.

I have tried the Mx edits and custom edits and can't get past this error. I either get U126 or U007.

Here are a couple of samples I've tried:

595:509,01,ZD,EDIT=(T),SIGNS(+,-))

595:509,01,PD,EDIT=(M1))

Does anyone have any ideas on this?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Feb 28, 2019 1:39 am
Reply with quote

Quote:
I have a field that is one byte and is X'JD'
X'JD' appears to be invalid. What do you see in that position with HEX-ON?
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Feb 28, 2019 1:44 am
Reply with quote

Crap.

It's X'D1'.

It's been a long day. :-(
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Feb 28, 2019 1:55 am
Reply with quote

Code:
509,01,ZD,EDIT=(TS),SIGNS(,,+,-)
for a TRAILING sign worked good for me. If you still get an error, post the error message from your SYSOUT.
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Feb 28, 2019 2:14 am
Reply with quote

Not yet.....

Code:

594:509,01,ZD,EDIT=(TS),SIGNS(,,+,-))   

ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 04, IFTHEN 0 
ICE751I 0 C5-BASE   C6-BASE   C7-BASE   C8-BASE   E9-I48763 E7-I49502       
ICE052I 3 END OF DFSORT                                                     
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Feb 28, 2019 2:21 am
Reply with quote

Code:
ICE126A 9 INCONSISTENT REFORMATTING FOR SORTOUT : REASON CODE 04, IFTHEN 0
Unless you show the complete SYSOUT/Control statements, including the IFTHEN, hard to guess.
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Feb 28, 2019 2:28 am
Reply with quote

Found the problem. Thanks for your help and patience!
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Feb 28, 2019 2:41 am
Reply with quote

Great! Do you mind posting what you found, for the benefit of others.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Mar 07, 2019 12:32 pm
Reply with quote

A zoned decimal X'D1' is -1 (or perhaps 1-, depending on whether you want a leading or trailing sign. See the discussion on decimal signs in this link.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Mar 07, 2019 4:01 pm
Reply with quote

I thought x'1D' was -1 (or 1-)? D1 is alpha 'J' - hence the confusion up top?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Mar 07, 2019 7:10 pm
Reply with quote

A 1 byte packed decimal X'1D' is -1 as is a 1 byte zoned decimal X'D1'
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Mar 07, 2019 9:41 pm
Reply with quote

Well it turns out it wasn't the packed sign that was the problem: it was that the column assignment overlaid another field definition. I assumed (dangerous, I know) that the problem was with the edit mask, since that was the first time I had used one in DFSort.

Sigh, I wish this installation had SyncSort rather then DFSort. SyncSort messages were much easier to understand.
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top