View previous topic :: View next topic
|
Author |
Message |
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
how can I filter data while viewing a dataset. For eg. I want to view only col num 1-5 .. or only the rows having 1234 in col 6-10. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
please specify better Your requirement,
I sincerely do not see how it is cobol related,
I guess that it might be more an ISPF issue
for column selection nothing You can do
for line/row selection/display something along
EXC ALL; F "1234" 6 10 ALL
might give the expected result |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
Thnx for it enrico. for row selection that was helpful.
The first query-Suppose this is my dataset view.
+----5----+-
************
0424145171BB
0424145171BB
036383000000
0424145171BB
0424145171BB
Now I only want to see col 45-47 data to clearly distinguish it from the rest. I need it cos I have to sum up a field of some specific rows.
Hope its clear. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
repeat on
for column selection nothing You can do |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
ok enrico. thnx. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I too am confused how this relates to cobol. . .
Your requirement is most unclear. . .
If you want to look at only certain fields in certain records, you can easily read the file and copy the selected portions you want to work with to another file with plenty of spaces between the values for ease of readability. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
will take care of this in future.i understand its an ispf issue and not a cobol one. you can move it.
but my doubt is still the same..how am I going to select particular column range, say stuff in col 1-10 of my dataset I want to pick, like we do for rows.
As enrico says, perhaps there is no way.
Am sorry if its still unclear. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
but my doubt is still the same..how am I going to select particular column range, say stuff in col 1-10 of my dataset I want to pick, like we do for rows. |
If you really believe you need this, suggest you can write the above mentioned code to separate the values. . . .
Using COLS (as your sample data shows) will easily let you see which positions contain which values. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
YES..THANX. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
ISPF has a function called formats that can do what you want. I think it is really designed for displaying double byte languages but it can work for what you want. I've seen people do what you are asking with it but I don't know how to do it because I never needed to. From what I remember, you define a format, then on the edit panel you specify that format and it shows the columns you specified in the format. Option 11 on the ISPF utility panel. |
|
Back to top |
|
|
manishmittal
New User
Joined: 25 Apr 2008 Posts: 49 Location: Gurgaon
|
|
|
|
You can make use of FileAid to get what you want.Before that you have to define a dummy copybook having field for those particular columns.
e.g. If your input is
+----5----+-
************
0424145171BB
0424145171BB
036383000000
0424145171BB
0424145171BB
Now define a copybook having
01 filler pic x(44).
01 dummy pic x(3).
Then open your dataset using Fileaid and the above copybook in VFMT mode.And you will get the desired result. |
|
Back to top |
|
|
manishmittal
New User
Joined: 25 Apr 2008 Posts: 49 Location: Gurgaon
|
|
|
|
Also please make sure if FileAid is installed in your system. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
If you really want a particular column range to be more easily viewed, you could do the following, but keep in mind, you'll want to CANCEL when done (not SAVE) or do this on a copy of your original data set:
Code: |
C P'=' ' ' 11 80 ALL |
This assumes you're interested in columns 1-10 only of an 80-byte record. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
thats brilliant..!! ths z wht i xactly wanted.. ..can u pls xplain i tto me..
what does 'P' stand for..? is it for position..?
just want to know so that i can extend its usability.
thnx manish..i dont have fileaid..but yes filemgr serves the purpose.
Mbabu ..I cudnt xplore that option further.
thnx all. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
PF1 will give you alll you need to know.
here is a snapshot
Code: |
TUTORIAL --------------------- 'CHANGE' STRINGS ---------------------- TUTORIAL
COMMAND ===>
A picture string is used to describe the type of string to be changed
instead of the exact characters to be changed.
Example - ===> chg all p'¬' 'x' 72 change all non-blanks in column
72 to the character "x"
A picture string is a quoted string that is preceded or followed by the
letter "P". It can contain blanks, alphabetic and numeric characters
which represent themselves, or any of the special characters listed
below, each of which represents a class of characters.
The special characters that can be used in a "from" picture string are:
= - any character . - invalid characters
@ - alphabetic characters - - non-numeric characters
# - numeric characters < - lower case alphabetics
$ - special characters > - upper case alphabetics
¬ - non-blank characters
The special characters that can be used in a "to" picture string are:
= - any character < - lower case alphabetics
> - upper case alphabetics
|
Gerry |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
thnx gerry..thats an addition. I simply gave a "qw change" in command line and got so many options to play with. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
thats brilliant..!! ths z wht i xactly wanted.. |
Make sure you CANCEL out of the editor when doing this. Simply ending will destroy your data. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
thnx dick..i prefer view mode else it can be destructive..u nvr knw.. |
|
Back to top |
|
|
|