View previous topic :: View next topic
|
Author |
Message |
gsbrar16
New User
Joined: 21 Dec 2006 Posts: 27 Location: india
|
|
|
|
Hi,
My requirement is to convert a PD field to numeic field.
PD field has a picture clause of S9(6)V9(2) COMP-3.
i am using the following control statement to acheive this
OUTREC FIELDS=(1,10,17,2,PD,TO=BI,8)
But this statement is working fine for some records but for some others, it is failing with SOC7 abend.
please help me in this case.
thanks, |
|
Back to top |
|
|
gsbrar16
New User
Joined: 21 Dec 2006 Posts: 27 Location: india
|
|
|
|
I basically want to know that what kind of situation/file record type can cause a abend with this statement. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
PD field has a picture clause of S9(6)V9(2) COMP-3. |
That means it's a 5-byte PD field but you're using a 2-byte PD field.
Code: |
OUTREC FIELDS=(1,10,17,2,PD,TO=BI,8)
|
That should be:
Code: |
OUTREC FIELDS=(1,10,17,5,PD,TO=BI,LENGTH=8)
|
Note LENGTH=8 instead of 8. 8 would be the starting position of the next field.
Quote: |
But this statement is working fine for some records but for some others, it is failing with SOC7 abend. |
The S0C7 abend could be caused by a value that has bad PD data. |
|
Back to top |
|
|
gsbrar16
New User
Joined: 21 Dec 2006 Posts: 27 Location: india
|
|
|
|
thanks Frank.
Can you please also tell me what in this situation can be classified as BAD DATA for PD to BI conversion? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
gsbrar16 wrote: |
Can you please also tell me what in this situation can be classified as BAD DATA for PD to BI conversion? |
BAD DATA in a packed decimal field is usually an invalid sign or possibly non numeric data in the rest of the field. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Can you please also tell me what in this situation can be classified as BAD DATA for PD to BI conversion? |
For that type of conversion with DFSORT, the only thing that's classified as bad data and can cause an S0C7 is a digit of A-F rather than 0-9. So for example, the 3-byte PD value X'000A0C' would have bad data beause of the A digit. |
|
Back to top |
|
|
gsbrar16
New User
Joined: 21 Dec 2006 Posts: 27 Location: india
|
|
|
|
Thanks very much.
regards, |
|
Back to top |
|
|
|