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

How to convert Numeric values to zoned decimal values


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
selvan_nn

New User


Joined: 16 Oct 2007
Posts: 12
Location: Chennai

PostPosted: Fri Aug 16, 2013 3:35 am
Reply with quote

Hi,

I trying to convert the singed numeric values to Zoned decimal values like this.

Singed Numeric values:

-0000000001.02
-0000000001.39
-0000000000.35
-0000000005.21
-0000000001.97
-0000000008.61
-0000000002.00
-0000000000.35
-0000000104.73
-0000000174.69

Expecting Zoned decimal values:

00000000010B
00000000013I
00000000003E
00000000052A
00000000019G
00000000086A
00000000020{
00000000003E
00000001047C
00000001746I

Please help me to convert the values as above using sort card.

Thanks,
M.S
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 16, 2013 4:03 am
Reply with quote

Which SORT product do you use?

You have Signed Fixed-Format fields. See if you can find in your documentation how that is defined to SORT. It should then be a very easy process.
Back to top
View user's profile Send private message
selvan_nn

New User


Joined: 16 Oct 2007
Posts: 12
Location: Chennai

PostPosted: Fri Aug 16, 2013 4:06 am
Reply with quote

Bill Woodger wrote:
Which SORT product do you use?

You have Signed Fixed-Format fields. See if you can find in your documentation how that is defined to SORT. It should then be a very easy process.


I am using SYNCSORT for converting the values. Could you please provide the sort card to convert the values as i mentioned..
Back to top
View user's profile Send private message
selvan_nn

New User


Joined: 16 Oct 2007
Posts: 12
Location: Chennai

PostPosted: Fri Aug 16, 2013 4:10 am
Reply with quote

Pls provide the sort card the values as I mentioned. I am using SYNCSORT for converting the values.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 16, 2013 5:49 am
Reply with quote

Well, it is something like this:

Code:
  OPTION COPY
  INREC OVERLAY=(start,length,type,TO=ZD,LENGTH=length)


Not so difficult. I've told you how to find out about the "type" and even given a big clue for a possibility.

Open a manual. Search the forum. Google. It is too simple to ask for help with. Sorry, not even ask for help, but ask to be done.

Good night.
Back to top
View user's profile Send private message
selvan_nn

New User


Joined: 16 Oct 2007
Posts: 12
Location: Chennai

PostPosted: Fri Aug 16, 2013 8:27 pm
Reply with quote

I tried the same sort card OUTREC FIELDS=(5,15,SFF,ZD,LENGTH=10) earlier but the result is not coming as expected.

I/P
000000000139
000000000035
000000000521
000000000197
000000000861
000000000200
000000000035

The results of the Sort O/P Came as below:

0000000139
0000000035
0000000521
0000000197
0000000861
0000000200
0000000035

But the results should be like below:

000000013I
000000003E
000000052A
000000019G
000000086A
000000020}
000000003E

Please check the results and revert back with your suggestions.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 16, 2013 8:36 pm
Reply with quote

Well, as far as I can see your input shows no signs. I think that might be a problem. If you have signs and lost them, paste them again, in the Code tags please, to preserve formatting/spacing.
Back to top
View user's profile Send private message
selvan_nn

New User


Joined: 16 Oct 2007
Posts: 12
Location: Chennai

PostPosted: Fri Aug 16, 2013 8:45 pm
Reply with quote

Hi, Thanks for your suggestion.

I tried with Sign as below:
-000000000102
+000000000139
+000000000035
+000000000521
+000000000197
+000000000861
+000000000200
+000000000035
-000000010473
+000000017469
+000000022415
+000000004840

The O/P came as below:

000000010K
0000000139
0000000035
0000000521
0000000197
0000000861
0000000200
0000000035
000001047L
0000017469
0000022415
0000004840

But it Should be as below:

000000010K
000000013I
000000003E
000000052A
000000019G
000000086A
000000020}
000000003E
000001047L
000001746I
000002241E
000000484}

I used the below sort card

SORT FIELDS=COPY
INREC FIELDS=(1,15,SFF,ZD,LENGTH=10)

Please provide your suggestion. I am waiting for your reply
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Fri Aug 16, 2013 9:13 pm
Reply with quote

Quote:
in the Code tags please, to preserve formatting/spacing

What is so hard about using the code-tags? If you are not prepared to help those prepared to help you then why should they bother helping you? And why are you demanding code? Are you prepared to pay people for their time nd expertise in producing code for you?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 16, 2013 9:40 pm
Reply with quote

OK, change ZD to ZDC.
Back to top
View user's profile Send private message
selvan_nn

New User


Joined: 16 Oct 2007
Posts: 12
Location: Chennai

PostPosted: Fri Aug 16, 2013 10:14 pm
Reply with quote

I just asked you to help not asking any code... Also i used based on your I/P
s... The way you responded to me was why came to us... B'se we dont know anything... If you are know the issue help me out.. Otherwise leave it.. I wasted my time...
Back to top
View user's profile Send private message
selvan_nn

New User


Joined: 16 Oct 2007
Posts: 12
Location: Chennai

PostPosted: Fri Aug 16, 2013 10:16 pm
Reply with quote

Thats all I want... Its working fine... Thanks a lot for your help....
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Aug 16, 2013 10:19 pm
Reply with quote

selvan_nn wrote:
B'se we dont know anything...

Your join date is 16 Oct 2007. Unless you have taken over this ID from someone else, it is to be presumed that you have at least five and a half years' experience. What have you been doing in that time that you haven't learned anything?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Aug 17, 2013 12:14 am
Reply with quote

Hello,

I suspect the time was invested in learning things other than sort . . .?

Many organizations still insist that code be written for this type of process . . . Kinda wasteful, but is still the "standard" at these places.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Aug 20, 2013 11:21 am
Reply with quote

selvan_nn wrote:
I just asked you to help not asking any code...
Is there a language barrier in here?

Nic talked about using BBCode Tags, written in PHP programming language to give the records (input/output) a feel like if they will come on a Mainframe Terminal. This is available above the "reply box" in rectangular box with "Code" written on it.

For example, this is not coded and this is the way you show it:

-000000000102
+000000000139
+000000000035
+000000000521
+000000000197
+000000000861
+000000000200
+000000000035
-000000010473
+000000017469
+000000022415
+000000004840

and this is coded:
Code:
-000000000102
+000000000139
+000000000035
+000000000521
+000000000197
+000000000861
+000000000200
+000000000035
-000000010473
+000000017469
+000000022415
+000000004840


BBcode(code-tags) and some "code" are too different to be compared...Don't get confused with them.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
Search our Forums:

Back to Top