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
 

 

How to convert packed decimal to character in CA Easytrieve┬

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
ganeshram

New User


Joined: 13 Jun 2008
Posts: 2
Location: chennai

PostPosted: Wed Jun 18, 2008 8:05 pm    Post subject: How to convert packed decimal to character in CA Easytrieve┬
Reply with quote

How to convert a Packed decimal value to character in CA Easytrieve® Plus?
Back to top
View user's profile Send private message

chandrarkar

New User


Joined: 27 May 2008
Posts: 24
Location: india

PostPosted: Wed Jun 18, 2008 9:18 pm    Post subject:
Reply with quote

I think myself moving a packed to an alphanumeric field.
it shud do fine
Back to top
View user's profile Send private message
chandrarkar

New User


Joined: 27 May 2008
Posts: 24
Location: india

PostPosted: Tue Aug 26, 2008 3:45 pm    Post subject:
Reply with quote

hi i got this info from other sources

This section describes how to convert the previously discussed packed-decimal formats into text strings to print or display the information in a human readable form. Before converting the packed-decimal fields it should be determined if a conversion is necessary. The following list provides some basic guidelines.

1. When migrating an application (both data and COBOL programs for processing the data) from an IBM Mainframe to a Micro Focus and Windows environment a conversion is not necessary. Micro Focus COBOL supports the packed-decimal format.
2. When migrating an application (both data and COBOL programs for processing the data) from an IBM Mainframe to a Micro Focus and UNIX environment a conversion is not necessary. Micro Focus COBOL supports the packed-decimal format.
3. When migrating or transferring data from a COBOL oriented, IBM Mainframe or AS/400 environment to a non-COBOL oriented (Windows or UNIX) environment (i.e. ASCII/Text or excel spreadsheet) then a conversion will be required. This may require two conversion tasks. The packed-decimal fields (or data strings) will need to be converted to a zoned-decimal format (sign leading separate with an explicit decimal point should be considered depending on the target environment). The zoned-decimal format may then require a conversion from EBCDIC to ASCII.
4. When using the File Transfer Protocol (FTP) to transfer a data file between a mainframe and a Windows or UNIX environment it will be necessary to use the BINARY mode if the records contain packed-decimal fields. If a conversion between EBCDIC and ASCII is required it will need to be done after the transfer.

thanks
teja
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Aug 26, 2008 8:55 pm    Post subject:
Reply with quote

Hello,

How does this relate to the Easytrieve question?

Quote:
How to convert a Packed decimal value to character
Please post a couple of examples of packed values you have and how you want the after they are converted. As was mentioned, a simple move may be all that you need.
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Thu Aug 28, 2008 11:23 am    Post subject: Reply to: How to convert packed decimal to character in CA E
Reply with quote

Hi,
I think as the other ppl said you can simply move it and it should work.
for eg-: ws-no 5 P 2 to can be moved to ws-ch 7 A.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Aug 28, 2008 8:58 pm    Post subject:
Reply with quote

Hello,

Quote:
I think myself moving a packed to an alphanumeric field.

Quote:
I think as the other ppl said you can simply move it and it should work.
Did you test these? What was the result?

This code:
Code:
DEFINE PKDFLD W 5 P 2 VALUE 123 
DEFINE DSCHCLD1 W 8 A           
MOVE PKDFLD TO DSCHCLD1     
DISPLAY PKDFLD             
DISPLAY DSCHCLD1           

gives this result:
Code:
      123.00   
444444FFF4FF4444
000000123B000000
________________
               
0013044444444444
0020C00000000000
________________


I suspect that is not what was desired. . .
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Aug 29, 2008 12:51 am    Post subject:
Reply with quote

The "move" command does not convert types. Use the assignment statement instead. Assign a numeric variable to the packed variable then assign the character variable to the numeric. Note for the numeric variable if the number of decimal places is zero still do not leave this off.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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