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

Change from PD to ZD thru sort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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: 1436
Location: Bangalore,India

PostPosted: Fri May 25, 2007 1:36 pm
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
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: 1436
Location: Bangalore,India

PostPosted: Fri May 25, 2007 4:11 pm
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
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
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 Developer


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

PostPosted: Sun May 27, 2007 12:49 am
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:

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:

Use [URL] BBCode for External Links
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top