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

Inserting some values in a table using cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
begginer

New User


Joined: 27 Feb 2009
Posts: 3
Location: India

PostPosted: Fri Mar 20, 2009 5:28 pm
Reply with quote

Hi,
I am inserting some values in a table using cobol. It has been seen that there is junk value appended to the input which has been feeded while checking in the table. Is there any way using inspect to remove these junks in data. icon_rolleyes.gif

Thank You
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Mar 20, 2009 5:32 pm
Reply with quote

Define what is JUNK?
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Fri Mar 20, 2009 5:34 pm
Reply with quote

I think you can intialize the table before loading it.

It would be better if you give the table structure, input fields that are loaded into the table fields etc,
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Mar 20, 2009 5:46 pm
Reply with quote

initializing the table will not help if the 'junk' is coming from another source.

insure that the data definitions for the input and the table match.

if you have 'junk' (unwanted data) in your input, you will have to fix that, either thru your input cobol program or the during the creation process of your input file.

but, we have no idea what you are doing. a little more explanation will help.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Mar 20, 2009 6:02 pm
Reply with quote

Review the following post -

ibmmainframes.com/viewtopic.php?p=143786&highlight=#143786

Submit/Post questions which you may have.

Regards,
Back to top
View user's profile Send private message
begginer

New User


Joined: 27 Feb 2009
Posts: 3
Location: India

PostPosted: Mon Mar 23, 2009 10:43 am
Reply with quote

I am inserting numeric values into the table (issue is with numeric fields only, characters are all inserted good), The JUNK here is supposed to be numeric value (8080 here) appended to every numeric input. I am removing all the leading zeroes and there aint any junk value when displaying them before insertion.
Thanks in anticipation
Back to top
View user's profile Send private message
senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Mon Mar 23, 2009 5:10 pm
Reply with quote

if you are inserting a numeric value in the table.it will display the correct value . you can put in the command line HEX. it will display the value in the hexadecimal format.using COMP fields are binary format.
some of the variable using COMP-3 field displayed in the packed decimal.
you can convert the hexadecimal to binary format manually..
for example if u want to insert the numeric value 23 means
Code:
0012
007C

if iam wrong please correct it...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Mar 23, 2009 9:24 pm
Reply with quote

Hello,

Show the input data definition, the input data in hex, the output (array/table) definition, and the code that moves the data from the input to the table.
Back to top
View user's profile Send private message
begginer

New User


Joined: 27 Feb 2009
Posts: 3
Location: India

PostPosted: Tue Mar 24, 2009 1:58 pm
Reply with quote

Thank You guys, the problem was with the table. It has been sorted out !! 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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Load new table with Old unload - DB2 DB2 6
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top