Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Conversion of ZD TO PD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Conversion of ZD TO PD
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    Post subject: Re: Conversion of ZD TO PD
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 Moderator


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

PostPosted: Fri May 12, 2006 2:25 am    Post subject:
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    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 File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us