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

How to get comp data in the file in 3.4


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

New User


Joined: 19 Mar 2006
Posts: 26
Location: India

PostPosted: Mon Apr 23, 2007 9:45 pm
Reply with quote

Hi ,

When we create a new file , initially by default what data it should contain ?
I got an input file specified in the JCL and when i opened it through 3.4 option it contained some comp data and through Start tool i was able to feed some data into it. My question is how one should start with a fresh file and what will be the data in that file ? On the whole i will say if i develop a program from scratch and i create a fresh file , then what will be it's status without one entering the data into it and what is the right way one should enter the data..

How do we get com data in the file when we view it through 3.4 option.


Regards,
bh
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 Apr 23, 2007 11:13 pm
Reply with quote

Hello,

When you create a file, the content is entirely up to you. Typically, when one creates a file, records are written to it is some predefined format.

If you have an existing file and you suspect it has comp data, you can browse the file in 3.4. Once the file is displayed on the screen, enter HEX ON in the command line and hit enter. You will see 3 lines per record - the first line is the displayable data and the next 2 lines are the hex values for that data. When ther are "unprintable" characters (which happens often with comp data) you will be able to see the actual hex values.

If this i not what you are looking for, we're here icon_smile.gif
Back to top
View user's profile Send private message
bh

New User


Joined: 19 Mar 2006
Posts: 26
Location: India

PostPosted: Tue Apr 24, 2007 5:45 pm
Reply with quote

Thanks fore the response.


I want to know how comp value come into the file and initially when u create the file but don't feed any data into it then what would be the contents of it ? Does it take some values by default ?

Regards,
bh
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Apr 24, 2007 7:08 pm
Reply with quote

bh wrote:
I want to know how comp value come into the file
Hoe can you put comp value into the file? Or how does comp values suddenly appear in the file?
Quote:
and initially when u create the file but don't feed any data into it then what would be the contents of it ? Does it take some values by default ?
If you create it but don't write to it, it is empty, no records.....
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: Tue Apr 24, 2007 7:46 pm
Reply with quote

Hello,

Please try to explain your question in different terms. I'm not sure that we understand what the question is.

Comp values (or any other values) will not be in a file unless they are placed there by an editor or some other program (sort, COBOL, IEBGENER, etc).

If you are writing a program, you will typically open it for output and then write some number of records. What your code places in the data area written from will be in the file. If you write from an area that is not initialized (or has some fields that are not initialized), the content of the records will be unpredictable.

As Bill mentioned, if a file is created but ot written to, it will be an empty file - the first "read" will raise the "at end" condition.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top