View previous topic :: View next topic |
Author |
Message |
gsat Beginner
Joined: 24 Nov 2005 Posts: 9 Topics: 3
|
Posted: Wed May 03, 2006 4:15 am Post subject: How to convert a Character field to PD using syncsort |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed May 03, 2006 4:56 am Post subject: |
|
|
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 |
|
|
gsat Beginner
Joined: 24 Nov 2005 Posts: 9 Topics: 3
|
Posted: Wed May 03, 2006 6:31 am Post subject: |
|
|
Thanks Kolusu.
I will try this oput and get back.
BTW what is this format FS? _________________ Thanks,
sathya |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed May 03, 2006 7:44 am Post subject: |
|
|
gsat,
FS stands for floating sign format.
Hope this helps..
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
gsat Beginner
Joined: 24 Nov 2005 Posts: 9 Topics: 3
|
Posted: Fri May 05, 2006 3:09 am Post subject: |
|
|
Thanks Kolusu. It worked!!
Thanks,
Gsat |
|
Back to top |
|
|
|
|