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

converting hexa decimal into binary format using sort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
k.nitin

New User


Joined: 02 Apr 2007
Posts: 4
Location: chennai

PostPosted: Mon May 28, 2007 12:07 pm
Reply with quote

Hi everyone

can any one of u help me !!!!!

I want to sort the data into an output file from input file which is having hexa decimal values in to noramal binary format.

awaiting for ur reply
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon May 28, 2007 12:34 pm
Reply with quote

Please give examples of what the input looks like (hexa decimal values) and what you want the output to look like (noramal binary format).
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon May 28, 2007 12:47 pm
Reply with quote

Nitin,

Use OUTREC FIELDS=(start_position,var_length,PD,TO=BI). Please note that I have not converted HEXA to BINARY before and not tested the above sort card.

For more info, refer examples given at the bottom of the following link -

publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ICECA109/3.14?DT=20020722140254
Back to top
View user's profile Send private message
k.nitin

New User


Joined: 02 Apr 2007
Posts: 4
Location: chennai

PostPosted: Mon May 28, 2007 1:27 pm
Reply with quote

examples:

000001 AMX 2007-05-25 ? ? N
000002 NMX 2006-05-15MKL ? %NJ1A * r?
000003 NMX 2006-06-02MKL ? NJ1A * r?
000004 NMX 2006-06-27MBL ? NJ1A * r?
000005 NMX 2006-10-19MBL ? ? NJ1A * r?
000006 NMX 2006-05-15MKL ? %NJ1A * r?
000007 NMX 2006-06-02MKL ? NJ1A * r?
000008 NMX 2006-06-27MBL ? NJ1A * r?
000009 NMX 2006-10-19MBL ? ? NJ1A * r?
000010 NMX 2006-05-15MKL ? %NJ1A * r?
000011 NMX 2006-06-02MKL ? NJ1A * r?
000012 NMX 2006-06-27MBL ? NJ1A * r?
000013 NMX 2006-10-19MBL ? ? NJ1A * r?
000014 NMX <2006-05-15MKL ? %NJ1A * r?

copybook:
01 DCLTXGR0FIX.
10 FIX-RO-NO PIC S9(5)V USAGE COMP-3.
10 FIX-FLOOR-CD PIC S9(2)V USAGE COMP-3.
10 FIX-AISLE PIC X(2).
10 FIX-AISLE-SIDE PIC X(1).
10 FIX-MODULE-NO PIC S9(2)V USAGE COMP-3.
10 FIX-MOD-EFFV-DT PIC X(10).
10 FIX-MODULE-TYPE PIC X(3).
10 FIX-BASE-SHELF-WIDTH PIC S9(4)V USAGE COMP-3.
10 FIX-BASE-SHELF-DEPTH PIC S9(4)V USAGE COMP-3.
10 FIX-SPINE-HEIGHT PIC S9(4)V USAGE COMP-3.
10 FIX-SHELF-QTY PIC S9(2)V USAGE COMP-3.
10 FIX-PROM-IND PIC X(1).
10 FIX-MGRP-CD PIC X(3).
10 FIX-MOD-SEQ-NO PIC S9(4) USAGE COMP.
10 FIX-WORTHED-MOD-VAL PIC S9(1)V9(2) USAGE COMP-3.
10 FIX-WORTHED-WIDTH PIC S9(4)V USAGE COMP-3.


I have given u the copybook and the input data

i want the data FIX-BASE-SHELF-WIDTH PIC S9(4)V USAGE COMP-3.
10 FIX-BASE-SHELF-DEPTH PIC S9(4)V USAGE COMP-3.
10 FIX-SPINE-HEIGHT PIC S9(4)V USAGE COMP-3.
10 FIX-SHELF-QTY PIC S9(2)V USAGE COMP-3.
10 FIX-PROM-IND PIC X(1).
10 FIX-MGRP-CD PIC X(3).
10 FIX-MOD-SEQ-NO PIC S9(4) USAGE COMP.
10 FIX-WORTHED-MOD-VAL PIC S9(1)V9(2) USAGE COMP-3.
10 FIX-WORTHED-WIDTH PIC S9(4)V USAGE COMP-3.

to get converted from hexa decimal to packed

can any one help me out!!
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon May 28, 2007 4:47 pm
Reply with quote

William Thompson wrote:
Please give examples of what the input looks like (hexa decimal values) and what you want the output to look like (noramal binary format).
This time try the actual input and output.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon May 28, 2007 9:42 pm
Reply with quote

You need to understand the various formats you're using and what you want to convert to what before anyone can help you. There's no such thing as hexadecimal format. Hexadecimal is just a way of representing values. Packed decimal is a format. Binary is a format. Zoned decimal is a format. All of these can be represented in hexadecimal.

COBOL has its own set of formats that correspond to DFSORT formats. For example, COMP-3 corresponds to PD. COMP corresponds to BI or FI, etc.

See the following for more information on COBOL formats vs DFSORT formats:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/C.3?DT=20060615185603

See the following for information on using DFSORT to convert from one format to another:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.7?DT=20060615173822
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top