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

Conversion of ZD TO PD


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

New User


Joined: 02 Aug 2005
Posts: 13
Location: hyderabad

PostPosted: Thu May 11, 2006 11:52 pm
Reply with quote

HI FRIENDS,

CAN U PLEASE GIVE ME A JCL OF CONVERTING ZD TO PD?

I HAVE A VALUE OF 109.86 .CAN U PLEASE HELP ME IN CONVERTING THIS VALUE INTO PACKED DECIMAL?

THANKS & REGARDS
SRAVAN
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri May 12, 2006 12:32 am
Reply with quote

Hi this JCL will work out,
Zd field == 9(3)v9(2)
PD field == 9(11)v9(2) you can receive it into any format

The sort card is working well for implied decimals, if you have a cobol field as 9(3).9(2), the suggested sort doesn't work.

for input output layout's check the attachment



//STEP020 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=JZ1B0C.TEST.FILE1,DISP=SHR
//SORTOUT DD DSN=JZ1B0C.TEST.FILE2,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(80,(80,10),RLSE),LRECL=80
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,5,
10:6,5,ZD,PD,LENGTH=7,
20:12,50)
/*
//*
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: Fri May 12, 2006 2:25 am
Reply with quote

Sravan,

You need to be clearer about what your input field looks like and what you want your output field to look like.

Is the 109.86 value a character value '109.86' - if so, what is the position and length of the field? Note that you can't use ZD for a value with an actual decimal point, but you can use DFSORT's UFF format, e.g. if the "ZD" values are 'ddd.dd' values starting in position 21, you could use these DFSORT control statements to convert them to 6-byte PD values.

Code:

   OPTION COPY
   INREC OVERLAY=(21:21,6,UFF,TO=PD,LENGTH=6)


Or is the 109.86 some other type of value, e.g. an internal value without the decimal point - if so, what is the position and length of the field and what does it look like in hex?

PD values do NOT have decimal points although the decimal point can be implied, e.g., '109.86' can be stored as a PD value of X'10986C' but any application that uses the PD value has to know about the implied decimal point.
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 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts SMF Record Date conversion failing CLIST & REXX 1
No new posts Assembler class assignment: stuck on ... PL/I & Assembler 12
Search our Forums:

Back to Top