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
 

 

Need help on Wrting REXX code

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

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sat Aug 07, 2010 12:24 pm    Post subject: Need help on Wrting REXX code
Reply with quote

Requirement As follows.
I have got input PS file layout like this.
1234567890123456789012345678901234578901234567890
VTN111P0 OCIS#TEST01 OCIS* 100801
VTN131P0 OCIT#TEST01 OCIT* 100801
.
.
.


Now I want to read THIS dataset each record and for each record create text like below

First Line JOBNAME(VTN111P0) ADID(OCIS#TEST)
Secondline APP(OCIS*) DATE(100801)

Create a new member in PDS the name of JOB name VTN111P0 with above text.

So for each reacord in PS, need to create one new member in PDS for above text.

If i have 200 records in PS, I should get 200 members in PDS with above text.

I am very much poor in REXX.

Let me know if you need any other details.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Aug 07, 2010 1:34 pm    Post subject:
Reply with quote

What have you written for yourself so far, and where do you experience the problems.

What research have you done, as there are lots and lots of good code examples on this very forum.

As this is a HELP forum rather than a custom supply forum you need to realise that the contributers on here do like to see some effort from the poster and would rather suggest code improvements than just supplying code. Also, as we contribute on our own time and have no guarantees of when we will be available any urgency in the code requirement is yours and yours alone.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Sat Aug 07, 2010 4:55 pm    Post subject: Reply to: Need help on Wrting REXX code
Reply with quote

Read the input dataset into a REXX stem variable.
EXECIO.

Loop through the input records one at a time.
DO Controlled repetitive loops.

Parse the input data into the respective variables:
PARSE VAR.

Queue the output records into the data stack.
QUEUE.

You'll have to build and issue a TSO ALLOCATE command to allocate the output PDS and member name.

Write the output.
FREE the output.

Although, if you're by your own admission not very good with REXX, then why code this in REXX? Certainly you could use other options or facilities that you ARE more familiar with?
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sat Aug 07, 2010 8:07 pm    Post subject: Reply to: Need help on Wrting REXX code
Reply with quote

> Write the output.

Write is also through Execio

You also need ALLOCATE command for your input dataset.

You need to understand the concept of stem variables. They are produced by the EXECIO statement when you read a file.
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Sat Aug 07, 2010 11:25 pm    Post subject: Re: Need help on Wrting REXX code
Reply with quote

pk2803 wrote:
Need help on Wrting REXX code


I suggest you start learning to write English first.
Back to top
View user's profile Send private message
pk2803

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sat Aug 07, 2010 11:30 pm    Post subject:
Reply with quote

Thank you very much for you suggestion.
Everyone got the problem, what i am asking for.

This is Technical Forum, need to look at the problem rather than grammatical errors.
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Sun Aug 08, 2010 1:26 am    Post subject:
Reply with quote

The UK has a strict policy regarding VISA. You are clearly a fish who slipped through the net. Given your lack of knowledge of English and your obvious lack of programming knowledge, I will inform my trade organization about you and hope they will take it further, resulting in you being sent back to wherever you came.
Back to top
View user's profile Send private message
pk2803

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sun Aug 08, 2010 3:41 am    Post subject:
Reply with quote

I am sorry, if hurt you..
I wrote this from NOKIA phone, may be typo and keyboard is not user friendly.

Regards,
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: Sun Aug 08, 2010 9:10 am    Post subject:
Reply with quote

Hello,

Quote:
This is Technical Forum, need to look at the problem rather than grammatical errors.
The "problem" seems to be communication. We will help you get to the result you are looking for - we will not provide the code for you. One of the primary missions of our forum is to help people help themselves. This often involves some looking and work on the part of the requestor.

Expat, Kevin, and Pedro have provided a lot of information. If you do as they suggest, you will have pretty much everything you need. If you find something recommended that is not clear, post what you found and your doubt - someone will be able to clarify.

Quote:
I wrote this from NOKIA phone, may be typo and keyboard is not user friendly.
FWIW - it is considered bad form to blame the hardware/software.

Good luck - someone will be here when there are questions.
Back to top
View user's profile Send private message
pk2803

New User


Joined: 06 Nov 2008
Posts: 8
Location: uk

PostPosted: Sun Aug 08, 2010 10:26 am    Post subject:
Reply with quote

Thank you superk, As per you suggestion, I have coded the REXX program and it is working fine. Cool

Thank you very much all
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: Sun Aug 08, 2010 10:31 am    Post subject: Reply to: Need help on Wrting REXX code
Reply with quote

Good to hear it is working - thank you for the follow up icon_smile.gif

d
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 PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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