View previous topic :: View next topic
|
Author |
Message |
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Hi All,
Is there any JCL, can convert Comp-3 fields to Normal one.
Regards,
Priyesh. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
COMP-3 fields are PD (packed decimal) fields. DFSORT can convert and edit PD fields in many ways. The exact DFSORT statement you would use depends on exactly what you mean by "normal one". For example, if you want to convert a 3-byte PD field to a 5-byte ZD field, you could use a DFSORT INREC statement like this:
Code: |
INREC FIELDS=(...,p,3,PD,TO=ZD,LENGTH=5,...)
|
For some more information on DFSORT's conversion functions, see:
www.ibm.com/servers/storage/support/software/sort/mvs/beyond_sorting/online/srtmboft.html#ocv
For some more information on DFSORT's editing functions, see:
www.ibm.com/servers/storage/support/software/sort/mvs/beyond_sorting/online/srtmboft.html
If you need more specific help on this, you need to supply more detailed information about the starting position and length of the input field, and what exactly you want the output field to look like. Also, what is the RECFM and LRECL of the input file? |
|
Back to top |
|
|
ys_more
New User
Joined: 21 Jun 2005 Posts: 5
|
|
|
|
HI, U can also use IBEGENER utility to convert a whole record or field in a record from packed decimal(comp-3) to zoned decimal(numeric).
code sysin as
//SYSIN DD *
GENERATE MAXNAME = 1
MEMBER= (CODE THIS IF UR FILE IS PDS MEMBER GIVE MEMBER NAME NOT REQUIRED FOR SEQUENTIAL FILE)
FIELD=(LENGTH OF RECORD, 1,PZ,1) |
|
Back to top |
|
|
kaleelahamed
New User
Joined: 08 Jun 2006 Posts: 45 Location: Trumbull, CT
|
|
|
|
Will it be shown normally? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What is this
Quote: |
Will it be shown normally? |
asking?
If you clarify what you want to know, someone may have a suggestion.
Also, when you have a question, it is better to start a new topic (with complete info as to what you want to know) rather than reply to a 2-year-old topic. |
|
Back to top |
|
|
sgaid21
New User
Joined: 12 Sep 2006 Posts: 16 Location: Canada
|
|
|
|
You can use sort to do editing the PD fields as
OUTREC FIELDS=(1:1,5,PD,EDIT=(TTTTTT.TT))
Assuming PD field reserving 5 bytes and you want to see in Dec(8,2) format.
T: would show as 0 if not value in the field
I hope that would help. |
|
Back to top |
|
|
kaleelahamed
New User
Joined: 08 Jun 2006 Posts: 45 Location: Trumbull, CT
|
|
|
|
Sorry For the confusion.
I wrote like,
What will happen to sign, if the COMP 3 is signed?
Will it be shown normally?
Can any one please let me know? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
What will happen to sign, if the COMP 3 is signed?
Will it be shown normally?
|
You keep saying "normally" without explaining what you mean by that so how do you expect us to answer you?
DFSORT has many ways to edit a PD field. There are many predefined edit masks available (M0-M26) as well as the EDIT and SIGNS parameters which let you pick your own edit mask. If you use an edit mask with a sign, then the sign will be displayed. For example:
Code: |
INREC FIELDS=(...,p,3,PD,EDIT=(STTTTT),SIGNS=(+,-))
|
For more information, see:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.8?DT=20060615173822
If you tell us what you want the output field to look like, we can tell you how to convert it. |
|
Back to top |
|
|
|