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
 

 

Change from PD to ZD thru sort

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

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri May 25, 2007 11:46 am    Post subject: Change from PD to ZD thru sort
Reply with quote

Hi

How can we change from Packed decial field to Zoned decimal in a file thru sort ?
(sign fields included)

T & R
Prabs
Back to top
View user's profile Send private message

bansal

New User


Joined: 03 Jan 2007
Posts: 27
Location: Hyderabad

PostPosted: Fri May 25, 2007 11:59 am    Post subject: Re: Change from PD to ZD
Reply with quote

Try this

Outrec Fields = (startpos, length,edit(STTTTT.TT),signs=(,-,,))


Number of T depends on the length.
Back to top
View user's profile Send private message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri May 25, 2007 1:14 pm    Post subject: Re: Change from PD to ZD
Reply with quote

Got it. Thank you very much
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri May 25, 2007 1:36 pm    Post subject:
Reply with quote

bansal,


Quote:
Outrec Fields = (startpos, length,edit(STTTTT.TT),signs=(,-,,))


Huh.....are you sure your sort card works perfectly?
Back to top
View user's profile Send private message
bansal

New User


Joined: 03 Jan 2007
Posts: 27
Location: Hyderabad

PostPosted: Fri May 25, 2007 3:06 pm    Post subject: Re: Change from PD to ZD thru sort
Reply with quote

it should, Why u have any doubt.. or if u know it wont .. can u give the reason and explanation.. and the correct solution too..
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri May 25, 2007 4:11 pm    Post subject:
Reply with quote

Bansal,

Why?

Verify edit(STTTTT.TT) syntax. And also verify other errors present in the statement.
Back to top
View user's profile Send private message
bansal

New User


Joined: 03 Jan 2007
Posts: 27
Location: Hyderabad

PostPosted: Fri May 25, 2007 7:34 pm    Post subject: Re: Change from PD to ZD thru sort
Reply with quote

murmohk1,


I saw some slips in my previous post.

It would be something like


Outrec Fields = (startpos, length,PD,Edit=(STTTTT.TT),signs=(,-,,))
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri May 25, 2007 7:58 pm    Post subject: example of convertion
Reply with quote

prabs2006
Here is an example for a card explaining convertion from one numeric type to another.

This is the snapshot from the manual. icon_arrow.gif
Quote:
INREC, OUTREC and OUTFIL can convert a field in one numeric format to another numeric format. You can
convert BI, FI, PD, PD0, ZD, CSF/FS, UFF, SFF, FL or Y2x input fields to BI, FI, PD, PDF, PDC, ZD, ZDF,
ZDC or CSF/FS output fields. The length of the output field can be defaulted or specified. As a simple
example, if you specify:
OUTREC BUILD=(21,5,ZD,TO=PD,8,4,ZD,TO=FI,LENGTH=2)
the zoned decimal values in positions 21-25 and 8-11 of the input records will be converted, respectively, to a
packed decimal value in positions 1-3 and a fixed-point value in positions 4-5 of the output records.



Hope this helps u
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: Sun May 27, 2007 12:49 am    Post subject:
Reply with quote

Quote:
How can we change from Packed decial field to Zoned decimal in a file thru sort ? (sign fields included)


You would use p,m,PD,TO=ZD,LENGTH=n where p is the starting position of the PD input field, m is its length, and n is the length of the ZD output field.

Note that EDIT=(STTTTT.TT) would NOT create a ZD field. A ZD field does NOT have a leading sign or a decimal point.

For more information on numeric conversions with DFSORT, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.7?DT=20060615173822

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
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 Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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