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
 

 

REXX File handling

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

New User


Joined: 03 Nov 2008
Posts: 42
Location: Pune

PostPosted: Thu Jan 29, 2009 1:17 pm    Post subject: REXX File handling
Reply with quote

Can i get a simple code to extract line by line records from a flat file using REXX?
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Thu Jan 29, 2009 1:20 pm    Post subject:
Reply with quote

Search the forum and you'll find working examples here.
Back to top
View user's profile Send private message
mpawan
Warnings : 2

New User


Joined: 03 Nov 2008
Posts: 42
Location: Pune

PostPosted: Thu Jan 29, 2009 1:42 pm    Post subject:
Reply with quote

But I want to do that without using JCL
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Jan 29, 2009 1:50 pm    Post subject:
Reply with quote

look at execio in the rexx manual. or search for execio in the forums.
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Thu Jan 29, 2009 3:14 pm    Post subject:
Reply with quote

Hi Following code may help you
Code:
/* REXX */
"ALLOC DA('ASR.NVV.RUN.PROCLIB("MEMBER1")') F(INPUT) SHR REUSE"
 "EXECIO * DISKR INPUT (STEM LINES. FINIS"
   Do i = 1 To lines.0
      Say lines.i
      End
      Exit
"FREE F(INPUT)"


Also you can see http://www.ibmmainframes.com/about36121.html
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Jan 29, 2009 4:10 pm    Post subject:
Reply with quote

lohithegde -

Your EXIT instruction is misplaced.

O.
Back to top
View user's profile Send private message
lohithegde

New User


Joined: 18 May 2008
Posts: 31
Location: Chennai

PostPosted: Thu Jan 29, 2009 4:30 pm    Post subject:
Reply with quote

Hi

thanks for correcting me
Code:
/* REXX */
"ALLOC DA('ASR.NVV.RUN.PROCLIB("MEMBER1")') F(INPUT) SHR REUSE"
 "EXECIO * DISKR INPUT (STEM LINES. FINIS"
   Do i = 1 To lines.0
      Say lines.i
      End
      "FREE F(INPUT)"
   Exit
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 Jan 29, 2009 9:40 pm    Post subject:
Reply with quote

Hello,

There is probably something i am misunderstanding. . . icon_confused.gif

Quote:
But I want to do that without using JCL
How does this relate to the suggestion to search the forum sor rexx examples?


Also, when posting code for a requirement, it is best to test the code or mention that it is untested when it is posted.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Jan 29, 2009 10:01 pm    Post subject: Reply to: REXX File handling
Reply with quote

Quote:
it is best to test the code or mention that it is untested when it is posted.

Agree!

lohithegde: you use an uninitialized variable.

and your indentation does not look right.
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am


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