Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
convert BI to ZD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
thilakvs
Warnings : 1

New User


Joined: 07 Aug 2007
Posts: 27
Location: chennai

PostPosted: Thu Dec 13, 2007 4:11 pm    Post subject: convert BI to ZD
Reply with quote

I want to convert BI to ZD. This is the input i m having.

1234567890,2222222
-2147483647,222222
-1111111111,22222
2147483647,22222
2020952576,2222
1020952576,2222

i m getting the output like this

102095257F,
123456789{,
202095257F,
214748364G,
214748364I,
318385618E,

i m trying to convert 4 bytes like

OUTREC FIELDS = (1,4,BI,ZD)

But i m not able to get expected output..
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Dec 13, 2007 4:18 pm    Post subject:
Reply with quote

Quote:
But i m not able to get expected output..
what is the expected o/p?
Did you look at Converting Numeric Fields to Different Formats
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu Dec 13, 2007 4:19 pm    Post subject:
Reply with quote

These are data, and not direct link with JCL.
Wrong forum.
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: Thu Dec 13, 2007 11:04 pm    Post subject:
Reply with quote

Hello,

Quote:
These are data, and not direct link with JCL.
Wrong forum.
Depends on whether this is DFSORT or Syncsort icon_smile.gif
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu Dec 13, 2007 11:08 pm    Post subject:
Reply with quote

?? even if it is with DFSORT or Syncort it ist still programs ( or utilities ) and there is a dedicated forum for that ?

Soupir ! Snif ! icon_smile.gif
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: Thu Dec 13, 2007 11:28 pm    Post subject: Reply to: convert BI to ZD
Reply with quote

Hi Pierre,

Yup, there is a "home" for DFSORT.

Syncsort topics tend to gather in JCL.

d
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Dec 13, 2007 11:52 pm    Post subject:
Reply with quote

Quote:
I want to convert BI to ZD. This is the input i m having.

1234567890,2222222
-2147483647,222222
-1111111111,22222
2147483647,22222
2020952576,2222
1020952576,2222


These are NOT BI values. BI values cannot be displayed directly and cannot be negative. FI values cannot be displayed directly but can be negative. BI and FI values can be displayed as hex or converted to displayable characters.

These look like FS (floating sign) values.

You need to explain more clearly what your input values look like. Do they actually look like you've shown, or are these converted values, or what? Showing the input records in hex would help.

Perhaps it's just a matter of using:

Code:

    OUTREC BUILD=(1,4,FI,TO=ZDF)


but that's just a wild guess given that it isn't clear what your input actually looks like.
Back to top
View user's profile Send private message
thilakvs
Warnings : 1

New User


Joined: 07 Aug 2007
Posts: 27
Location: chennai

PostPosted: Fri Dec 14, 2007 12:31 pm    Post subject: convert BI to ZD
Reply with quote

Hi,
Let me clear my question:
I have used File aid to view that Binary value and from there the values are

I/P File

999999999
2147483647
1111111111
2147483647
2020952576
1020952576

And the Expected O/P file is

999999999
1020952576
1111111111
2020952576
2147483647
2147483647

And the o/p that I am getting is

099999999I
102095257F
111111111A
202095257F
214748364G
214748364G

The sort Card that I have used is

SORT FIELDS=(1,4,BI,A)
OUTREC BUILD=(1,4,BI,TO=ZD)

Why is the sort giving unexpected results and is there any way in getting the expected result.

I have used the following sort card to get the expected results but I would like to know why my other sort card is not working

SORT FIELDS=(1,4,BI,A)
OUTREC BUILD=(1:1,4,BI,EDIT=(TTTTTTTTTT))

Thanks for all your help
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: Fri Dec 14, 2007 9:20 pm    Post subject:
Reply with quote

Hello,

Quote:
Why is the sort giving unexpected results and is there any way in getting the expected result
The sort is giving the proper results. You asked for zoned-decimal output (which includes a sign) and that is what the output contains.

The letters A thru I are the positive values for 1 - 9. If you had any negative values, you would see J - R for minus 1 - 9.
Plus and minus zero are shown as { and }.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Dec 14, 2007 10:54 pm    Post subject:
Reply with quote

thilakvs,

When I run a DFSORT job with your example input and control statements, the output has what you want:

Code:

0999999999   
1020952576   
1111111111   
2020952576   
2147483647   
2147483647   


Note that's because DFSORT uses an F for the positive ZD sign with TO=ZD. So if the last digit is 1, you will get X'F1' = '1'.

Since you are getting a C sign (X'C1' = 'A' instead of X'F1' = '1') that means you're NOT using DFSORT. I suspect you're using Syncsort which uses a C sign for the positive ZD sign with TO=ZD. If you were using DFSORT, you would get the result you expect. With Syncsort, you don't.

DFSORT allows TO=ZDF to specify F as the sign (equivalent to TO=ZD in DFSORT's case) - perhaps Syncsort allows TO=ZDF to change their default.
Back to top
View user's profile Send private message
thilakvs
Warnings : 1

New User


Joined: 07 Aug 2007
Posts: 27
Location: chennai

PostPosted: Mon Dec 17, 2007 4:12 pm    Post subject: Reply to: convert BI to ZD
Reply with quote

Thanks a lot Dick and Frankā€¦. I managed to get the expected results using ZDF icon_lol.gif
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: Mon Dec 17, 2007 9:23 pm    Post subject: Reply to: convert BI to ZD
Reply with quote

You're welcome icon_smile.gif

Thank you for letting us know it is working.

d
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 Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us