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
 

 

Data move error S0c7

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sriram_motamarri
Warnings : 1

New User


Joined: 14 Sep 2006
Posts: 11
Location: Chennai

PostPosted: Sun Nov 30, 2008 1:58 am    Post subject: Data move error S0c7
Reply with quote

I have a file which is basically coma delimited file.

I want to extract the fileds of it.

One of the field is some units, in the file the value is 7.323
I read it in the program as S9(3)V9(6).
The output field as defined as S9(3)V9(6).
But i am getting S0c7 while moving them.

Please help
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sun Nov 30, 2008 3:14 am    Post subject: Re: Data move - reg
Reply with quote

Are you saying that the decimal-point is implied or is actually present in the CSV file?

If it is actually present (a/k/a an edit-pattern field), then you need place this value into an edited-field (999.999999) then move this edit-pattern field into a field defined as S9(03)V9(06). This is sometimes known as "de-editing".

I'm also assuming that the data-length is always 09-bytes.

Will the decimal-data always be positive? If so, then there's no need to define the field as signed display-numeric.

Bill
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Nov 30, 2008 4:59 am    Post subject:
Reply with quote

Hello,

Quote:
I'm also assuming that the data-length is always 09-bytes.
If the units value might contain less than 10 positions (999.999999) or 11 if there is a possible negative value, you might consider doing the UNSTRING into a pic x field and then using NUMVAL to move the units value to the 999v(9) field. The sample value posted is only 5 positions in length.

As Bill mentioned, if the value cannot ever be negative, there is no need to make the target field signed.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sun Nov 30, 2008 6:28 am    Post subject:
Reply with quote

Quote:

I'm also assuming that the data-length is always 09-bytes.

Dick,

I do my best counting after Thanksgiving. Altryptophan overdose ya know icon_wink.gif

Bill
Back to top
View user's profile Send private message
sriram_motamarri
Warnings : 1

New User


Joined: 14 Sep 2006
Posts: 11
Location: Chennai

PostPosted: Sun Nov 30, 2008 8:06 am    Post subject:
Reply with quote

Hi Bill,

Yes the decimal point is implied in the CSV file.
Please tell me how i need to read it and move.
Let say the value is 7.233
The field i want in the output file is +007233000
i.e.,S9(3)V9(6)

Thanks,
Sriram
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Nov 30, 2008 8:38 am    Post subject:
Reply with quote

Hello,

As i mentioned previously, define the receiving field from the unstring as pic x(10) or x(11) depending on whether there might be a negative value and then use the NUMVAL function.

NUMVAL is fully documented in the cobol language reference available vie the "IBM Manuals" link at the top of the page.

You will find that you receive faster "help" if you follow suggestions when they are initially posted. . . icon_smile.gif
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am


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