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

Requirement is to convert a PD field to numeic field


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gsbrar16

New User


Joined: 21 Dec 2006
Posts: 27
Location: india

PostPosted: Wed Jun 13, 2007 8:41 pm
Reply with quote

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
View user's profile Send private message
gsbrar16

New User


Joined: 21 Dec 2006
Posts: 27
Location: india

PostPosted: Wed Jun 13, 2007 8:44 pm
Reply with quote

I basically want to know that what kind of situation/file record type can cause a abend with this statement.
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: Wed Jun 13, 2007 9:53 pm
Reply with quote

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
View user's profile Send private message
gsbrar16

New User


Joined: 21 Dec 2006
Posts: 27
Location: india

PostPosted: Sun Jun 17, 2007 2:44 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Jun 17, 2007 5:12 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Sun Jun 17, 2007 8:08 pm
Reply with quote

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
View user's profile Send private message
gsbrar16

New User


Joined: 21 Dec 2006
Posts: 27
Location: india

PostPosted: Wed Jun 20, 2007 9:14 pm
Reply with quote

Thanks very much.

regards,
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
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 Join 2 files according to one key field. JCL & VSAM 3
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
Search our Forums:

Back to Top