View previous topic :: View next topic
|
Author |
Message |
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Topic discussed earlier. Search the forum for the previous posts. |
|
Back to top |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Zoned decimal should be 12 (Including a decimal point), correct me if I am wrong.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
Thank you dick... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
|