View previous topic :: View next topic
|
Author |
Message |
mpawan Warnings : 2 New User
Joined: 03 Nov 2008 Posts: 42 Location: Pune
|
|
|
|
Can i get a simple code to extract line by line records from a flat file using REXX? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Search the forum and you'll find working examples here. |
|
Back to top |
|
|
mpawan Warnings : 2 New User
Joined: 03 Nov 2008 Posts: 42 Location: Pune
|
|
|
|
But I want to do that without using JCL |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
look at execio in the rexx manual. or search for execio in the forums. |
|
Back to top |
|
|
lohithegde
New User
Joined: 18 May 2008 Posts: 31 Location: Chennai
|
|
|
|
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 www.ibmmainframes.com/about36121.html |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
lohithegde -
Your EXIT instruction is misplaced.
O. |
|
Back to top |
|
|
lohithegde
New User
Joined: 18 May 2008 Posts: 31 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There is probably something i am misunderstanding. . .
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|