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
 
SORT to unpack a feild

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Fri Jul 07, 2017 4:32 am    Post subject: SORT to unpack a feild
Reply with quote

Hi

I am struggling to do this task and cannot found any example.

I have a 100 byte FB file and one of the feild of that file is coming in unreadble format. This feild is at position 70 and having value of b?

I want to convert this feild to readble format only and rest all data/feilds should remain as it is.

in hex b? is showing as 826.

0001237747757577577 00000001800 E1 2165165 N 0 5 b?E1737744588588585858585858858

Regards
Back to top
View user's profile Send private message

dneufarth

Active User


Joined: 27 Apr 2005
Posts: 252
Location: Cincinnati OH USA

PostPosted: Fri Jul 07, 2017 5:44 am    Post subject:
Reply with quote

Is this a 1 byte field at position 70?

X'82' = c'b'
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 252
Location: Cincinnati OH USA

PostPosted: Fri Jul 07, 2017 5:45 am    Post subject:
Reply with quote

Hex display of record would be nice as well.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Fri Jul 07, 2017 1:37 pm    Post subject:
Reply with quote

Hi Dave,
Thanks.

its a 2 byte starting at postion 70. Do you have any sample sort/jcl?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1868
Location: UK

PostPosted: Fri Jul 07, 2017 2:27 pm    Post subject:
Reply with quote

How about showing the record - as requested. Is this a binary or packed decimal field? Look up the manual if you cannot find the answer to a similar requirement in the forum.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 252
Location: Cincinnati OH USA

PostPosted: Fri Jul 07, 2017 6:09 pm    Post subject:
Reply with quote

C''b?' is X'826F' and unpacked is C'826'

Putting 3 bytes in place of 2 bytes is not possible. You'll have to place it somewhere else in your record.

Once you decide where, there should be plenty of examples for changing hex (packed) to char using sort in this forum.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 175
Location: Maryland

PostPosted: Fri Jul 07, 2017 10:09 pm    Post subject: Re: SORT to unpack a feild
Reply with quote

shr_amar wrote:
Hi

I am struggling to do this task and cannot found any example.

I have a 100 byte FB file and one of the feild of that file is coming in unreadble format. This feild is at position 70 and having value of b?

I want to convert this feild to readble format only and rest all data/feilds should remain as it is.

in hex b? is showing as 826.

0001237747757577577 00000001800 E1 2165165 N 0 5 b?E1737744588588585858585858858

Regards

1. There is no such thing as "100 byte FB file". Maybe, a dataset with 100-bytes FB records?

2. There is no such thing as "feild". Maybe, a field?

3. In order "to convert this feild to readble format" first of all you need to know the format of the source field. Otherwise it makes no sense at all - to convert unknown data to "readable" format...

4. "in hex b? is showing as 826" - what does this mean? What "in hex" stands for? Where it is showing? What tool you are using?

5. "I am struggling to do this task and cannot found any example." - before struggling to do any task it would be useful to understand the task itself. Otherwise it resembles breaking the brickwall with your elbow.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1788
Location: NY,USA

PostPosted: Mon Jul 10, 2017 8:48 pm    Post subject:
Reply with quote

Ask the Creator of the data set for the explanation of the value and seek for the copybook <if any>.
"?" however looks to me a null value derived from the DB2 database and "b" is by itself based on 2 bytes explanation given by you.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 4 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am

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