View previous topic :: View next topic
|
Author |
Message |
selvan_nn
New User
Joined: 16 Oct 2007 Posts: 12 Location: Chennai
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
selvan_nn
New User
Joined: 16 Oct 2007 Posts: 12 Location: Chennai
|
|
|
|
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 |
|
|
selvan_nn
New User
Joined: 16 Oct 2007 Posts: 12 Location: Chennai
|
|
|
|
Pls provide the sort card the values as I mentioned. I am using SYNCSORT for converting the values. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
selvan_nn
New User
Joined: 16 Oct 2007 Posts: 12 Location: Chennai
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
selvan_nn
New User
Joined: 16 Oct 2007 Posts: 12 Location: Chennai
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK, change ZD to ZDC. |
|
Back to top |
|
|
selvan_nn
New User
Joined: 16 Oct 2007 Posts: 12 Location: Chennai
|
|
|
|
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 |
|
|
selvan_nn
New User
Joined: 16 Oct 2007 Posts: 12 Location: Chennai
|
|
|
|
Thats all I want... Its working fine... Thanks a lot for your help.... |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
|