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
 

 

Inserting some values in a table using cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Inserting some values in a table using cobol
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    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Fri Mar 20, 2009 5:46 pm    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Mar 20, 2009 6:02 pm    Post subject: Reply to: INSPECT USAGE
Reply with quote

Review the following post -

http://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    Post subject: Reply to: Inserting some values in a table using cobol
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    Post subject:
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

Site Director


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

PostPosted: Mon Mar 23, 2009 9:24 pm    Post subject:
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    Post subject:
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    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 BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 0 Tue Jul 25, 2017 12:12 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


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