IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jul 30, 2008 1:38 pm
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
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 31, 2008 10:24 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top