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: 10327
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: 2086
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 opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
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
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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