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

Deleting some lines in a Dataset using Clist


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Wed Sep 23, 2009 5:01 pm
Reply with quote

Hi,

I have a requirement, based on the users input, we need to delete some lines from a dataset. Is there any command in Clist/ ISPF to delete some lines from the given dataset.

Thanks in advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Sep 23, 2009 5:28 pm
Reply with quote

there are many ways of doing it, depending on ...

how clear are the requirements
how to identify the lines to delete
what kind of user interface
the size of the dataset

the ISPF dialog might be simple if the arguments to be used for the task
can fit in one screen

then depending on the dataset size
1) edit in place ( after a backup )
2) submit a <sort> job to do it

but I would never use a clist, only REXX, REXX, REXX, ...
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Sep 23, 2009 9:03 pm
Reply with quote

Quote:
if the arguments to be used for the task
can fit in one screen


You can define a scrollable area in a panel to get more than 24 lines on a screen.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Sep 23, 2009 9:06 pm
Reply with quote

Quote:
You can define a scrollable area in a panel to get more than 24 lines on a screen.

easy for the output, bit more complicated ( if not impossible ) for the input
( I am rather inclined for the impossible )
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Sep 24, 2009 1:35 am
Reply with quote

Actually, it is pretty easy. You can convert pretty much any standard panel with three additional lines. See the example.

Code:
)PANEL KEYLIST(ISPTEST,ISP)                                         
)ATTR                                                               
 ` AREA(SCRL) EXTEND(ON)                                           
 ~ TYPE(text) COLOR(blue) INTENS(high)                             
 @ TYPE(text) COLOR(green) INTENS(high)                             
 ¢ TYPE(OUTPUT) COLOR(GREEN) INTENS(LOW)                           
 # TYPE(input) COLOR(TURQ) INTENS(HIGH) hilite(uscore)             
 ¬ TYPE(text) COLOR(TURQ) INTENS(HIGH)                             
 ? TYPE(TEXT) COLOR(WHITE) INTENS(HIGH) HILITE(USCORE)             
)BODY EXPAND(//)                                                   
%Help +                                                             
~/-/+                                                               
~toolname/ /Application Fields      / /                             
@Command ===>#ZCMD                                                 
                                                                   
`SAREA39                                                           
)AREA SAREA39                                                       
@Fill in the fields below.                                         
                                                                   
@Field 1 . . . .#f1          +                                     
@Field 2 . . . .#f2          +                                     
@Field 3 . . . .#f3          +                                                                     
@Field 9 . . . .#f9          + repeat lines       
)END                                                               


You can add more data lines to see the effect, or split screen to make the 'screen' smaller.

The three lines:
1. attribute for AREA(SCRL)
2. line with use of that attribute
3. )AREA tag. everything after that tag is scrollable. I think you can have at least 400 lines.

actually, I said 'screen' in my earlier post, but meant to describe the panel data, not the physical screen.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top