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
 
Movement of x(20) to s9(9) comp

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

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Mon Jun 12, 2006 4:42 pm    Post subject: Movement of x(20) to s9(9) comp
Reply with quote

I have input file in which field has been defined with x(20) and the same
field has been defined as s9(9) comp in the loading table.

Can you please help me how to convert the alphanumeric field into integer?

Is there any way to load alphanumeric field into table as a binary field?

Thanks
Rajkumar
Back to top
View user's profile Send private message

ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Mon Jun 12, 2006 6:40 pm    Post subject: Re: Movement of x(20) to s9(9) comp
Reply with quote

I think it would be a lengthy process thru cobol.
Why not get it converted with a sort and then use it in your program???
( You can convert 'X' to ZD/PD using SFF)
Any corrections are welcome !!!

ap_mainframes
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Jun 12, 2006 7:14 pm    Post subject: Re: Movement of x(20) to s9(9) comp
Reply with quote

Rajkumar,

an you give us an example of what the alphanumeric data will look like and what the conversion value to integer will be?

Thanks,

Dave
Back to top
View user's profile Send private message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Tue Jun 13, 2006 5:27 pm    Post subject: Re: Movement of x(20) to s9(9) comp
Reply with quote

DavidatK wrote:
Rajkumar,

an you give us an example of what the alphanumeric data will look like and what the conversion value to integer will be?

Thanks,

Dave


Hi Dave,

The alphanumeric will contain numeric(some time will begin with char)

eg:
34523
667900123
pol3002333
qte5003444

I would appreciate, if u could give me a good solution.

Thanks,
Rajkumar.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Jun 15, 2006 3:28 pm    Post subject:
Reply with quote

Do you want to load the data only if it contains numeric data or either way. You can not load the non numeric data into a column defined as integer.
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 COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm

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