Converting BIT String Value



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Converting BIT String Value

Postby ravisankarc » Wed May 14, 2014 4:21 pm

Hi,

I want to convert a BIT string value into a readable format using ICETOOL control card. My input is as below:


Offset Type Length Description
74(X'4A') Bitstring 2 Dataset Organization

Can somebody help me on writing a control card.

Regards
Ravi
ravisankarc
 
Posts: 47
Joined: Thu Aug 27, 2009 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: Converting BIT String Value

Postby BillyBoyo » Wed May 14, 2014 4:27 pm

Which specific ICETOOL operator are you using?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Converting BIT String Value

Postby ravisankarc » Wed May 14, 2014 5:20 pm

Hi Billy,

I am using the below operator :

OUTFIL VTOF,BUILD=(29,05,2X,13,4,2X,29,44,2X,160:X)

In the above control card I want to include the bit string field to get the readable output.

"I don't know how to use 'code' while giving replies. Can somebody teach me so that it will be helpful for me to display the requirement in a professional way."

Regards
Ravi
ravisankarc
 
Posts: 47
Joined: Thu Aug 27, 2009 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: Converting BIT String Value

Postby enrico-sorichetti » Wed May 14, 2014 6:19 pm

the snippet
****** ***************************** Top of Data ******************************
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
000004 //S1      EXEC PGM=SORT
000005 //SYSPRINT  DD SYSOUT=*
000006 //SYSOUT    DD SYSOUT=*
000007 //TOOLMSG   DD SYSOUT=*
000008 //DFSMSG    DD SYSOUT=*
000009 //SORTIN    DD *
000010 ABCDEFGHI
000011 JKLMNOPQR
000012 STUVWXYZ
000013 0123456789
000014 //SORTOUT   DD SYSOUT=*,DCB=(RECFM=FB,LRECL=80)
000015 //SYSIN     DD *
000016   OPTION COPY
000017   OUTREC FIELDS=(1,10,C' ==> ',1,10,HEX)
****** **************************** Bottom of Data ****************************


the result
********************************* TOP OF DATA **********************************
ABCDEFGHI  ==> C1C2C3C4C5C6C7C8C940
JKLMNOPQR  ==> D1D2D3D4D5D6D7D8D940
STUVWXYZ   ==> E2E3E4E5E6E7E8E94040
0123456789 ==> F0F1F2F3F4F5F6F7F8F9
******************************** BOTTOM OF DATA ********************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Converting BIT String Value

Postby BillyBoyo » Wed May 14, 2014 6:38 pm

enrico, bits, not hex.

More politely than usual, may I suggest that you should prefer BUILD over FIELDS on OUTREC and BUILD over OUTREC on OUTFIL. BUILD is not overloaded, FIELDS and OUTREC are. BUILD is a synonym of FIELDS on INREC, OUTREC and OUTREC on OUTFIL. DFSORT/SyncSort don't care, just a bit clearer for us :-)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Converting BIT String Value

Postby enrico-sorichetti » Wed May 14, 2014 6:59 pm

enrico, bits, not hex.

I have seen that, but nowhere I know

c'1' ==> x'f1'

will be displayed as
 b'11110001'


:mrgreen:

c /FIELDS/BUILD/* *


I feel strongly that the people asking should take the replies as starting points to investigate further
and not lazily use what is posted without understanding it.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Converting BIT String Value

Postby ravisankarc » Wed May 14, 2014 7:24 pm

Hi All,

I have given the bit string field in INCLUDE COND statement and got the desired output. Thank you for the above suggestions will keep the same for future reference.

Hence, closing this topic.

Regards
Ravi
ravisankarc
 
Posts: 47
Joined: Thu Aug 27, 2009 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: Converting BIT String Value

Postby enrico-sorichetti » Wed May 14, 2014 7:36 pm

I have given the bit string field in INCLUDE COND statement and got the desired output.


that' s not what You asked in the initial question :twisted:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Converting BIT String Value

Postby BillyBoyo » Wed May 14, 2014 7:57 pm

Yes. Bitstring on INCLUDE for SORT. Not really very close to the original question.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post