Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2504
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: 2504
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us