View previous topic :: View next topic
|
Author |
Message |
mukulbit
New User
Joined: 16 May 2007 Posts: 6 Location: pune
|
|
|
|
Hi All
I'm reading a VSAM file in that there is a Packed Decimal field and moving that field in to another Packed Decimal field and writting the new field in to a Flat file but in file i'm getting garbage value.Can any body tell me why this is happening? Code is
FILE INFILE VS
IN-CURR-BAL 1 9 P
FILE OUTFILE
OUT-CURR-BAL 1 9 P
OUT-CURR-BAL = IN-CURR-BAL
PUT OUTFILE |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
The first answer is that you are actually not doing the move, the second is that the garbage is in the input.
Display the input prior to the move and the output just after the move.
BTW, how do know it is garbage and what does it look like? |
|
Back to top |
|
|
mukulbit
New User
Joined: 16 May 2007 Posts: 6 Location: pune
|
|
|
|
I've displayed it is giving the correct value.but while putting in the file it is not giving desired result. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Display IN-CURR-BAL prior to the move and OUT-CURR-BAL just after the move.
By the way, how do know it is garbage and what does it look like? |
|
Back to top |
|
|
mukulbit
New User
Joined: 16 May 2007 Posts: 6 Location: pune
|
|
|
|
i did the same as you suggested.it is displaying correct values.but after writting in the file it giving the values as .
.........
.........
......?c.
......oo.
........?
.......?.
......&?.
......???
......h..
......... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
How about a hex display of a couple of the fields? |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Is the input file Variable Record length? |
|
Back to top |
|
|
priyamnavada
New User
Joined: 24 Dec 2005 Posts: 52 Location: hyderabad
|
|
|
|
Packed decimal looks that only while written in file. in order to view it, map inot file-aid or convert into characters using SORT. |
|
Back to top |
|
|
|