Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Requirement is to convert a PD field to numeic field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Requirement is to convert a PD field to numeic field
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    Post subject:
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 Moderator


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

PostPosted: Wed Jun 13, 2007 9:53 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Sun Jun 17, 2007 5:12 pm    Post subject:
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 Moderator


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

PostPosted: Sun Jun 17, 2007 8:08 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us