MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DFSORT - writing packed decimal with sign of F

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
MVS_blob
Beginner


Joined: 23 Oct 2007
Posts: 23
Topics: 9

PostPosted: Tue Aug 05, 2008 3:01 am    Post subject: DFSORT - writing packed decimal with sign of F Reply with quote

Hi,

I've got this bit of code which will convert a number to packed decimal with a sign of 'C'.

Code:
Code:

  SORT  FIELDS=COPY               
  OUTFIL FNAMES=SORTOUT,           
    OUTREC=(1,4,ZD,TO=PD,LENGTH=3)                   


Input:
Code:
2008


Output (HEX):
Code:
008
20C


I need to convert it to packed decimal with sign of 'F' instead (HEX):
Code:
008
20F


I've had a read of the DFSORT Application Programming guide at the EDIT= statement, but the parameters I,T,S don't appear to cater for packed decimal.

Any ideas?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Aug 05, 2008 4:47 am    Post subject: Reply with quote

why do you have to create a 'non-valid' sign?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Tue Aug 05, 2008 4:51 am    Post subject: Reply with quote

MVS_blob,

Why you wanna have 'F'. Both F and C stands for positive.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Aug 05, 2008 10:36 am    Post subject: Reply with quote

MVS_blob,

You can use PDF format to force DFSORT to put a F instead of C

Code:

  SORT  FIELDS=COPY               
  OUTFIL FNAMES=SORTOUT,           
     OUTREC=(1,4,ZD,TO=PDF,LENGTH=3) 


Hope this helps....

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Tue Aug 05, 2008 10:49 am    Post subject: Reply with quote

vkphani wrote:

Why you wanna have 'F'.


One advantage is that the 'F' sign generates printable numerics if you unpack it later!
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
MVS_blob
Beginner


Joined: 23 Oct 2007
Posts: 23
Topics: 9

PostPosted: Tue Aug 05, 2008 6:24 pm    Post subject: Reply with quote

Thanks kolusu,

TO=PDF works great.

The reason I need to have the packed sign as 'F' is because the output file will be compared with an existing production file. The production file is read by an EZYTRIEVE program that has the field defined as 'P' which sets the sign to 'F' by default.

Regards,

Blob.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group