Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to convert Numeric values to zoned decimal values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to convert Numeric values to zoned decimal values
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Aug 16, 2013 4:03 am    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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    Post subject: Re: Reply to: How to convert Numeric values to zoned decimal
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    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Aug 16, 2013 5:49 am    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Aug 16, 2013 8:36 pm    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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: 1715
Location: UK

PostPosted: Fri Aug 16, 2013 9:13 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Aug 16, 2013 9:40 pm    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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    Post subject: Reply to: How to convert Numeric values to zoned decimal val
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: 1738
Location: Bloomington, IL

PostPosted: Fri Aug 16, 2013 10:19 pm    Post subject: Re: Reply to: How to convert Numeric values to zoned decimal
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

Site Director


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

PostPosted: Sat Aug 17, 2013 12:14 am    Post subject:
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

Senior Member


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

PostPosted: Tue Aug 20, 2013 11:21 am    Post subject: Re: Reply to: How to convert Numeric values to zoned decimal
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us