View previous topic :: View next topic
|
Author |
Message |
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
Hi
I have a PS file. I want to insert low-values in some position say 5 to 10.
I tried it by opening the file in edit mode and typing C ALL ' ' 5 10 X'00' . But this puts non-displayable characters in position 5 to 10 . I want to know if these non-displayable characters (which can be searched using F all P'.' ) are same as Low values ? If not then how do i insert low values in a file . Using COBOL pgm we can do it , but is it possible to insert them directly in a file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
After the C ALL enter HEX ON. You will be able to see the content in hex.
Many values are non-displayable, but they are still valid. X'00' is such a value. |
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
So it means to insert low values in a file i should type it as C ALL ' ' 5 10 X'00' ; HEX ON .
But the pgm is not able to indentify field from 5 to 10 as low values ?
I am doing a check in the pgm for low values. It doesn't seem to indentify it . Could you please help me with the syntax ? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
So it means to insert low values in a file i should type it as C ALL ' ' 5 10 X'00' ; HEX ON . |
No. What you originally did inserted low values. Setting HEX ON simply lets you see those values displayed.
What (language) program are you using to check for low values? Can you show the code?
Garry. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But the pgm is not able to indentify field from 5 to 10 as low values ?
I am doing a check in the pgm for low values. It doesn't seem to indentify it . |
If the program is coded correctly, it will work as you want.
As Garry requested , show the data definition for this part of the file and the code that references the data. Also show a few of the modified records in hex. |
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
I am just trying to insert low values in a file and checking for the same field in cobol code by using the below syntax.
If Field-1 = low-values
display "low values in field"
end-if.
in cobol , we can use move low-values to field-1 . But what i was trying to do is insert low-values directly in a file and see if cobol code recognises it . |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
But you haven't show us much to work with. Where is the file definition? and the record structure?
Garry. |
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
the input file is of record length 80.
01 REC1.
02 FLD1 PIC X(3).
02 FLD2 PIC X(3).
02 FLD3 PIC X(3).
02 FILLER PIC X(71). |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
since you changed columns 5 thru 10 to low-values,
with which field in REC1 do you expect to make the compare? |
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
Here , based on the layout of REC1 , i am inserting low-values in FLD2 and then checking in cobol pgm if FLD2 has got low-values . |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
as you edited the file,
FLD1-COL01 thru COL03
FLD2-COL04 thru COL06
FLD3-COL07 thru COL09
you stated in your first post, col05 thru col10.
which means you missed fld1, 2/3 of FLD2, and all of FLD3.
so I would suggest comparing FLD3 to low-values. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is this working now?
If not, do as asked and post a few of the record in hex. . . |
|
Back to top |
|
|
|