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
 

 

How to read Index files (in Unix) using rexx program

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

New User


Joined: 25 Apr 2006
Posts: 5

PostPosted: Wed Jul 30, 2008 1:27 pm    Post subject: How to read Index files (in Unix) using rexx program
Reply with quote

Hi,

I am working on project contains RM COBOL running in Unix Platform. We have unix index files instead of database.

To read any content of the file, we have to write a dummy cobol program.

Please advise is there any other alternate way where i can read index files (in unix) using any rexx programs.

Also please let me know how to execute the rexx program in Unix?

Thanks.
Sundar
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Jul 30, 2008 1:38 pm    Post subject: Reply to: How to read Index files (in Unix) using rexx progr
Reply with quote

Quote:
We have unix index files instead of database.


could You please elucubrate a bit on these index files

as far as executing a rexx script all the unix like systems have the so called she/bang
if the first line of Your_thing start with
Code:
#! /bin/rexx

(means that something called rexx residing in the bin directory will be used to process Your_thing)
and the source thing has been made executable oring the one bit in the attributes
Code:
chmod 111 Your_thing


just typing in shell the name of Your_thing it will be execute
Back to top
View user's profile Send private message
Sundar V

New User


Joined: 25 Apr 2006
Posts: 5

PostPosted: Thu Jul 31, 2008 9:58 am    Post subject: Reply to: How to read Index files (in Unix) using rexx progr
Reply with quote

Hi enrico,
Thanks for your reply.

We create the index files in COBOL Program. example as below:

COBOL PGM1
Code:
000000 E.
000000     OPEN OUTPUT LOG-FILE.
030610 FD  LOG-FILE    BLOCK                  512      CHARACTERS
030611                 RECORD         22  TO   62      CHARACTERS
030612                 LABEL RECORD                    STANDARD.^
030613*^M
030614 01  LOG0-RECORD.^M
030615     05  LOGSA                   PIC X(01).^M
030616     05  LOG-KEY                 PIC X(21).
030616 01  LOG-RECORD                  PIC X(55).
030618 01  LOG1-RECORD                 PIC X(62).


then we run this cobol program using a script - which executes in $DATA.
which creates the file in our $DATA (/psup/idms_sh/data/live)

Code:
#!/bin/csh
[color=red]cd $DATA[/color]
#
#   cs-ktodate ***  KTODATES ***
#
#**********************************************************
#
EX runcob KTODATE -k
#
echo " ********************  END OF cs-ktodate   ***************"
#
# ********************  END OF cs-ktodate   ***************




Regarding my second question (executing the rexx script in unix), i dont understand clearly. i am new to unix and rexx. it will be very much helpful if you please give me an example. My requirement is to read these index files using a universal rexx program.

For example, we have file aid tool in mainframe, through which we browse the content of the files. like this can i read index files using any universal rexx program. please advise.

i checked my bin (/psup/comms_sh/bin) directory i couldnt see any rexx residing there. if so what to do. please advise.



Sorry for bothering much.

Thanks.
Sundar
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 Jul 31, 2008 10:24 am    Post subject:
Reply with quote

Hello,

Quote:
Sorry for bothering much
No bother icon_smile.gif

You might first check with your sysadmins to make sure rexx is available on your partixcular unix system and that you have the proper permissions to use it.

There are already tools on the system that allow you to read files. Again, if you ask the sysadmins, they can tell you which tools are available.

Depending on your files, you might try vi (an editor that has been on every unix system i've ever been issued a logon).
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


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