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
 

 

Extracting all the comments in the member to save as text

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
pandu

New User


Joined: 08 Dec 2005
Posts: 6
Location: pune

PostPosted: Thu Dec 08, 2005 1:19 pm    Post subject: Extracting all the comments in the member to save as text
Reply with quote

Hi All

could any one help me to do following task using CLIST or REXX,

"Extracting all the comments in the member and putting those comments in a new .txt file. "

cheers
pandu
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Dec 08, 2005 5:41 pm    Post subject: Re: Extracting all the comments in the member to save as tex
Reply with quote

And these comments would be identified how?
Back to top
View user's profile Send private message
pandu

New User


Joined: 08 Dec 2005
Posts: 6
Location: pune

PostPosted: Fri Dec 09, 2005 11:14 am    Post subject:
Reply with quote

hi superk,

thanks for u r interest to see this.

In COBOL member 7th column contains * it is comment na. i want to Extract these lines.


regards
pandu
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Dec 15, 2005 6:58 pm    Post subject: Re: Extracting all the comments in the member to save as tex
Reply with quote

To me, this would make more sense to do as an ISPF EDIT Macro. The following is a simple macro, written in REXX, that will do what you need.
Code:

/* REXX GETCOMM */                                         
"ISREDIT MACRO"                                           
"ISREDIT (currdsn) = DATASET"                             
"ISREDIT (currmem) = MEMBER"                               
"ISREDIT (last) = LINENUM .ZLAST"                         
x = LISTDSI("'"currdsn"'")                                 
If rc = 0 Then                                             
  Do                                                       
    recfm = Substr(SYSRECFM,1,1)||" "||,                   
      Substr(SYSRECFM,2,1)||" "||,                         
      Substr(SYSRECFM,3,1)||" "||,                         
      Substr(SYSRECFM,4,1)||" "||,                         
      Substr(SYSRECFM,5,1)||" "||,                         
      Substr(SYSRECFM,6,1)                                 
    recfm = Strip(recfm)                                   
    lrecl = SYSLRECL                                       
    blk   = SYSBLKSIZE                                     
  End                                                     
Do n = 1 To last                                           
  "ISREDIT (data) = LINE "n                               
  If Substr(data,7,1) = "*" Then Queue data               
End                                                     
Queue ""                                               
"ISREDIT RESET"                                         
ddname = "#"Time(S)                                     
dsname = currmem".TXT"                                 
"ALLOC DD("ddname") DA("dsname") MOD REU DELETE"       
"FREE DD("ddname")"                                     
"ALLOC DD("ddname") DA("dsname") NEW REU CATALOG       
  RECFM("recfm") LRECL("lrecl") BLKSIZE("blk")"         
"EXECIO * DISKW "ddname" (FINIS"                       
"ISPEXEC EDIT DATASET("dsname")"                       
"FREE DD("ddname")"                                     
Exit 0                                                 
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


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