Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

to view specific rows/cols in a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: to view specific rows/cols in a dataset
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu May 21, 2009 2:48 pm    Post subject: Reply to: to view specific rows/cols in a dataset
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu May 21, 2009 3:00 pm    Post subject: Reply to: to view specific rows/cols in a dataset
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    Post subject:
Reply with quote

ok enrico. thnx.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu May 21, 2009 8:56 pm    Post subject:
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    Post subject: am sorry dick..
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

Site Director


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

PostPosted: Thu May 21, 2009 10:22 pm    Post subject:
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    Post subject:
Reply with quote

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

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Thu May 21, 2009 10:37 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Fri May 22, 2009 9:00 am    Post subject:
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    Post subject: Terry..!!
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: 1703
Location: Australia

PostPosted: Fri May 22, 2009 2:06 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri May 22, 2009 2:58 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us