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

Want to convert these comp-3 to ZD format


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Wed May 02, 2007 3:18 pm
Reply with quote

Hi,
I have a VB input file, in that from 178 to 250 i have comp-3 variables. I want to convert these comp-3 to ZD format.
How can I do this?
Input File record Length:1000
Blk Size-27998
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Wed May 02, 2007 5:20 pm
Reply with quote

Topic discussed earlier. Search the forum for the previous posts.
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Wed May 02, 2007 5:30 pm
Reply with quote

Thanks murali for your response. I have searched the forum before posting this problem.
I have given the code:
OUTREC FIELDS=(1,4,178,72,PD,TO=ZD,LENGTH=72
But I got the error at 72:
CTL1CNTL :
OUTREC FIELDS=(1,4,178,72,PD,TO=ZD,LENGTH=72)

WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER271A OUTREC STATEMENT : NUMERIC FIELD ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000 .

While converting from PD to ZD how can I give the Length, Is it equivalent to input length?
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 May 03, 2007 1:49 am
Reply with quote

Hello,

Please note that your topic has been moved as your post concerns Syncsort.

I don't believe you can convert "all of them" in one field definition - how would the sort know if your packed fields were 2,3,5,7,etc bytes long? You need to define the starting position and length of each field.

I believe your control info will include something like
Code:

 OUTREC FIELDS=(. . .   178,lth,PD,ZD,nxt fld pos, etc)
 


where lth is the length of the first packed field in bytes and nxt fld pos is the byte-length of the next packed field and so on. . .
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Thu May 03, 2007 3:22 pm
Reply with quote

Thanx Dick..
I am using ICETOOL to do the above task...
I have one doubt My input field id s9(9)v9(2) comp-3. to convert this to ZD how much length I need to specify..Is it 6?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu May 03, 2007 3:39 pm
Reply with quote

Zoned decimal should be 12 (Including a decimal point), correct me if I am wrong..
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 May 03, 2007 7:40 pm
Reply with quote

Hello Mahi,

The length of the "output" field (ZD) will be 11 assuming the sign is in the high-order nibble of the low order byte and there is still an implied decimal place rather than an explicit decimap point (which is the definition of zoned decimal). A zoned decimal number takes one byte for each digit in the packed field being expanded. If a minus sign or a decimal-point is in the expanded field, it is an edited field rather than zoned decimal.

At your site ICETOOL is an alias for Syncsort's SYNCTOOL. Your job does not really use the DFSORT/ICETOOL (so be wary of any of the documented features of them - both products do not have the same features and some of the "same" features are coded differently).
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Fri May 04, 2007 4:47 pm
Reply with quote

Thank you dick...
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: Fri May 04, 2007 8:08 pm
Reply with quote

You're welcome icon_smile.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
Search our Forums:

Back to Top