Rexx code required

Ask/Clarify the questions on TSO, CLIST & REXX

Moderators: Veera, Moderator Group

Post Reply
Nanda Kishore
Member
Posts: 5
Joined: Mon Dec 10, 2007 7:48 pm

Rexx code required

Post by Nanda Kishore » Thu Dec 13, 2007 6:32 am

Hi

I have a file as shown below.and i need a rexx code in such a way that

if i give the transaction name and region,Then it should give the PSB name

Can any one suggest me with a rexx code
Input file:

TRAN REGION PSBNAME

WNADV IMSM50 C0405466
WNADV IMSM51 C0405467
WNADV IMSM52 C0405468
WNADV IMSM53 C0405469
WNADV IMSM54 C0405470
WNADV IMSM55 C0405455
WNADV IMSM56 C0405472
WNADV IMSM57 C0405473
WNADV IMSM58 C0405474
WNADV IMSM59 C0405475
WNBTL IMSM50 C0501831
WNBTL IMSM51 C0501832
WNBTL IMSM52 C0501833
WNBTL IMSM53 C0501834
WNBTL IMSM54 C0501835
WNBTL IMSM55 C0501820
WNBTL IMSM56 C0501837
WNBTL IMSM57 C0501838
WNBTL IMSM58 C0501839
WNBTL IMSM59 C0501840
WNCAB IMSM50 C0405490
WNCAB IMSM51 C0405491
WNCAB IMSM52 C0405492
WNCAB IMSM53 C0405493
WNCAB IMSM54 C0405494
WNCAB IMSM55 C0405479
WNCAB IMSM56 C0405496
WNCAB IMSM57 C0405497


Example:

Enter the Transaction name and Region

User choice: WNADV IMSM51

System response: C0405467


Please suggest me.
Thank you,In advance

With Best Regards,
Kishore

parthiban
Member
Posts: 6
Joined: Mon Mar 16, 2009 8:01 pm

Post by parthiban » Tue Mar 17, 2009 12:43 am

Hi..
First you put all records in one ps/member..Then you call that file
and read using EXECIO...Using stem you should compare the user input
with record-file..for that you can use POS function...Then the program should fetch exact record...And it should give third column string has output..for that you can use PARSE commands....

Try if have doubts..Let me know
PARTHIBANJ

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others