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
 

 

Comp-3 to Normal Conversion by JCL

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

Senior Member


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

PostPosted: Mon Jun 06, 2005 8:25 pm    Post subject: Comp-3 to Normal Conversion by JCL
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 Moderator


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

PostPosted: Mon Jun 06, 2005 9:39 pm    Post subject:
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:

http://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:

http://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    Post subject:
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    Post subject: what will happen to the sign?
Reply with quote

Will it be shown normally?
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 30, 2007 8:18 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Comp-3 to Normal Conversion by JCL
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 Moderator


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

PostPosted: Fri Aug 31, 2007 9:05 pm    Post subject:
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:

http://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    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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm


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