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 

How to convert a Character field to PD using syncsort

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


Joined: 24 Nov 2005
Posts: 9
Topics: 3

PostPosted: Wed May 03, 2006 4:15 am    Post subject: How to convert a Character field to PD using syncsort Reply with quote

I have a field in a record which is 8 bytes long and is alphanumeric.
The data that it holds can be ' -20' or ' -2'. (for example)

I want to capture the value of the numeric in this field along with its sign for processing in my program.
I want to do it using syncsort.
Can any one give me pointers for doing it?

Thanks,
Gsat
_________________
Thanks,
sathya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed May 03, 2006 4:56 am    Post subject: Reply with quote

gsat,

Assuming that your numeric field starts at pos 1 for 8 bytes , the following control cards will give the desired results.

Code:

//SYSIN DD *
  SORT FIELDS=COPY
  OUTREC FIELDS=(1,8,FS,PD,LENGTH=8)
/*

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


Joined: 24 Nov 2005
Posts: 9
Topics: 3

PostPosted: Wed May 03, 2006 6:31 am    Post subject: Reply with quote

Thanks Kolusu.
I will try this oput and get back.
BTW what is this format FS?
_________________
Thanks,
sathya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed May 03, 2006 7:44 am    Post subject: Reply with quote

gsat,

FS stands for floating sign format.

Hope this helps..

Cheers

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


Joined: 24 Nov 2005
Posts: 9
Topics: 3

PostPosted: Fri May 05, 2006 3:09 am    Post subject: Reply with quote

Thanks Kolusu. It worked!!

Thanks,
Gsat
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