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

SORT to unpack a feild


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Jul 07, 2017 5:44 am
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: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Jul 07, 2017 5:45 am
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
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: 2455
Location: Hampshire, UK

PostPosted: Fri Jul 07, 2017 2:27 pm
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: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Jul 07, 2017 6:09 pm
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

Senior Member


Joined: 29 Apr 2008
Posts: 2025
Location: USA

PostPosted: Fri Jul 07, 2017 10:09 pm
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Jul 10, 2017 8:48 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top