MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pulling information from file and putting it on message

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
neoframer
Beginner


Joined: 28 Jun 2003
Posts: 10
Topics: 6

PostPosted: Mon Jan 26, 2004 11:20 pm    Post subject: Pulling information from file and putting it on message Reply with quote

I need to do following :

I need to read a PDS member (lrecl 80) , then extract the information on 2nd , 3rd & 4th line between column 75 - 80 , & then concatenate that information & display it on screen. Need to do this by executing a single command.

For example:
Code:

s fasjkfg assgdsag ddggdfgh df gfdafgdgdgdg
gadsfg  gdghdjd dgjhd gdgd  gkfkfkf  gggggg
ghhhh                222222222222
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn  f
-----
-----
-----
-----
-----


So , what I need to do is , when I execute a command , I should get this display on screen :
Code:
ggggg 22222 nnn f
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Wed Jan 28, 2004 6:36 am    Post subject: Reply with quote

neoframer,
I have done it for a sample from cols 25-30.Change the following stmt as follows for extracting from cols 75-80
Code:

parse var record d1+74 d2+6

Code:

 /* rexx - spn */                                           
 "Alloc dd(Input) da('your.pds(member)') Shr Reuse"
 "Execio * Diskr Input(Stem in. Finis"                     
 "Free Fi(Input)"                                           
 x1 = parse_line(in.2)                                     
 x2 = parse_line(in.3)                                     
 x3 = parse_line(in.4)                                     
 say x1 x2 x3                                               
 exit                                                       
 parse_line:                                               
 arg record                                                 
 parse var record d1+24 d2+6                               
 return d2                                                 



Hope this helps...

Cheers,
Coolman
________
Ford Airstream
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group