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

Can we use PD Format fields in JOINKEYS


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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 29, 2010 10:04 pm
Reply with quote

Spent five minutes and looked at the Smart DFSORT Tricks

Quote:

Change a C sign to an F sign in PD values
A customer asked the following question:
I have three 5-byte packed decimal fields starting in positions 1, 6 and 11.
The positive values have a C sign (e.g X'123456789C'), but I need them to have an F sign.
The negative values have a D sign which I don't want to change.
Can DFSORT change the sign from C to F for the positive values?

DFSORT's TO=PDF feature makes it easy to change the C sign to an F sign in your PD values.
In this case, we can use OVERLAY to change the signs in the three specified fields
without changing anything else in each record.
Here's the control statements we'd use:
OPTION COPY
INREC OVERLAY=(1:1,5,PD,TO=PDF,
6:6,5,PD,TO=PDF,
11:11,5,PD,TO=PDF)

TO=PDF sets an F sign for each positive PD value regardless of whether it originally had an F sign or a C sign.
TO=PDC sets a C sign for positive PD values.
TO=ZDF sets an F sign for positive ZD values.
TO=ZDC sets a C sign for positive ZD values. the D sign is kept for negative values in all cases.
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 Apr 29, 2010 10:30 pm
Reply with quote

Jai Hind,

I can show you how to do what you want but I need more information.

Is 11 the starting position of the PD field in both files?

Which file has the PD field with the C sign?
Which file has the PD field with the F sign?

Which sign (C or F) do you want in the output records?

What is the RECFM and LRECL of each input file?
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 Apr 29, 2010 10:39 pm
Reply with quote

Dick,

It's not that I don't appreciate people trying to help - it's just that I get in later then everyone else because I'm on the U.S. West Coast and then I have to plow through all of the posts which is kind of counterproductive for me. There are 22 posts here in this thread. It should only have taken less than 5 at the most if I could have just asked the right questions myself. I just get a little tired of plowing through all these "good intentions". Even if the 22 posts helped clarify what was needed, that's a lot of posts. I think I can hone in on the problem and provide a solution more quickly in most cases, so I think the long discussions (and metadiscussions resulting from the discussions) are more of a distraction then a help. I hope you understand.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 29, 2010 10:46 pm
Reply with quote

Then I can well imagine you are not going to like
www.ibmmainframes.com/viewtopic.php?t=48326

Understand you, will comply.

dbz
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 Apr 29, 2010 10:56 pm
Reply with quote

Quote:
Then I can well imagine you are not going to like
www.ibmmainframes.com/viewtopic.php?t=48326


Yes, you're right. I've deferred even looking at that one until later today.

Quote:
Understand you, will comply.


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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
Search our Forums:

Back to Top