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

Comp-3 to Normal Conversion by JCL


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

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Jun 06, 2005 8:25 pm
Reply with quote

Hi All,

Is there any JCL, can convert Comp-3 fields to Normal one.

Regards,

Priyesh.
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 Jun 06, 2005 9:39 pm
Reply with quote

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
View user's profile Send private message
ys_more

New User


Joined: 21 Jun 2005
Posts: 5

PostPosted: Thu Aug 11, 2005 4:29 pm
Reply with quote

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
View user's profile Send private message
kaleelahamed

New User


Joined: 08 Jun 2006
Posts: 45
Location: Trumbull, CT

PostPosted: Thu Aug 30, 2007 3:57 pm
Reply with quote

Will it be shown normally?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Aug 30, 2007 8:18 pm
Reply with quote

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
View user's profile Send private message
sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Fri Aug 31, 2007 2:04 am
Reply with quote

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
View user's profile Send private message
kaleelahamed

New User


Joined: 08 Jun 2006
Posts: 45
Location: Trumbull, CT

PostPosted: Fri Aug 31, 2007 10:27 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Aug 31, 2007 9:05 pm
Reply with quote

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
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 Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts file manager is doing string conversion IBM Tools 3
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
Search our Forums:

Back to Top