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

Movement of x(20) to s9(9) comp


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts convert alphanumeric PIC X(02) to hex... COBOL Programming 3
Search our Forums:

Back to Top