View previous topic :: View next topic
|
Author |
Message |
bh
New User
Joined: 19 Mar 2006 Posts: 26 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
Back to top |
|
|
bh
New User
Joined: 19 Mar 2006 Posts: 26 Location: India
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|