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
 
reading from a file

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

Active User


Joined: 22 Mar 2009
Posts: 157
Location: South Africa

PostPosted: Thu Nov 19, 2009 10:45 pm    Post subject: reading from a file
Reply with quote

hi,
suppose my file structure is

abcd1
pqrs2
wxyz3

and i need to compare the 5th character(i.e. 1,2,3 etc) of the file with some variable then how can i do it in REXX.
Back to top
View user's profile Send private message

Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Thu Nov 19, 2009 10:55 pm    Post subject:
Reply with quote

You look in the REXX Manual for a clue
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10457
Location: italy

PostPosted: Thu Nov 19, 2009 11:03 pm    Post subject: Reply to: reading from a file
Reply with quote

/code snippet on

Code:
Address TSO "EXECIO * DISKR <ddname> (FINIS STEM rec."
do  i = 1 to rec.0
    if substr(rec.i,5,1) = <somechar> then do
        /* ... */
        /* ...   do some processing related to condition TRUE  */
        /* ... */
    end
    else do
        /* ... */
        /* ...   do some processing related to condition FALSE */
        /* ... */
    end

/code snippet off
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Nov 19, 2009 11:47 pm    Post subject: Reply to: reading from a file
Reply with quote

To summarize, you need to study the rexx reference manual and search for the following topics:

EXECIO
SUBSTR
stem variables
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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am
No new posts write multiple lines in PS file in cobol Balu5491 COBOL Programming 7 Wed Mar 07, 2018 10:27 am

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