Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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: 2086
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
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us