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

to view specific rows/cols in a dataset


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 21, 2009 2:42 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 21, 2009 2:48 pm
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 21, 2009 2:58 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 21, 2009 3:00 pm
Reply with quote

repeat on
for column selection nothing You can do
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 21, 2009 3:02 pm
Reply with quote

ok enrico. thnx.
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: Thu May 21, 2009 8:56 pm
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 21, 2009 9:35 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu May 21, 2009 10:22 pm
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 21, 2009 10:24 pm
Reply with quote

YES..THANX.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Thu May 21, 2009 10:37 pm
Reply with quote

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
View user's profile Send private message
manishmittal

New User


Joined: 25 Apr 2008
Posts: 49
Location: Gurgaon

PostPosted: Fri May 22, 2009 1:26 am
Reply with quote

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
View user's profile Send private message
manishmittal

New User


Joined: 25 Apr 2008
Posts: 49
Location: Gurgaon

PostPosted: Fri May 22, 2009 1:33 am
Reply with quote

Also please make sure if FileAid is installed in your system.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri May 22, 2009 9:00 am
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Fri May 22, 2009 1:39 pm
Reply with quote

thats brilliant..!! ths z wht i xactly wanted.. icon_biggrin.gif ..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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri May 22, 2009 2:06 pm
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Fri May 22, 2009 2:48 pm
Reply with quote

thnx gerry..thats an addition. I simply gave a "qw change" in command line and got so many options to play with. icon_smile.gif
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: Fri May 22, 2009 2:58 pm
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Fri May 22, 2009 3:11 pm
Reply with quote

thnx dick..i prefer view mode else it can be destructive..u nvr knw..
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts SET PATH in View DDL DB2 2
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top