MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

REXX(I/p-Cobol Copybook,O/p-var. with offset loc n len

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
computer
Beginner


Joined: 12 Jun 2007
Posts: 64
Topics: 17
Location: Hyderabad

PostPosted: Mon Aug 04, 2008 7:19 am    Post subject: REXX(I/p-Cobol Copybook,O/p-var. with offset loc n len Reply with quote

Hi Everybody,

My requirement is, a REXX program that can convert a cobol copybook into a variables list with there offset position value and length( as we have in Easytrieve program variable declaration).

But the constraint is that I can't submit a job and it's an VSE environment.

Thanks in advance.
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Mon Aug 04, 2008 7:27 am    Post subject: Reply with quote

I hope you are very familiar with COBOL and REXX!
Back to top
View user's profile Send private message
computer
Beginner


Joined: 12 Jun 2007
Posts: 64
Topics: 17
Location: Hyderabad

PostPosted: Mon Aug 04, 2008 8:06 am    Post subject: Reply with quote

Hi,

I am comfortable with Cobol and related to REXX, dont have an expert hand experience.

Please help me.

Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Aug 04, 2008 8:57 am    Post subject: Reply with quote

easy job, you are basically mimicing the compiler.

your constrainst are unrealistic.

do you have access to compile listings that contain these copybooks?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Aug 04, 2008 10:06 am    Post subject: Reply with quote

computer,


Check "Create DFSORT Symbols from COBOL COPYs" in the DFSORT smart tricks which uses a rexx routine to create the symbols from cobol copybook


https://www-304.ibm.com/systems/support/storage/software/sort/mvs/tricks/index.html
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
computer
Beginner


Joined: 12 Jun 2007
Posts: 64
Topics: 17
Location: Hyderabad

PostPosted: Thu Aug 07, 2008 8:09 am    Post subject: Reply with quote

Hi,

Kolusu, sorry to say that I have earlier mentioned that 'i can't submit a job'
Thanks for the reply. I got my answer.....and now able to generate variable list with offset and length.

I am facing one more problem, how to read a READERLIST (in VSE env.) if i have been given with JOB name(sorry this question doesn't belong to this group).

Thanks in advance for any help
Back to top
View user's profile Send private message
Santlou
Beginner


Joined: 18 Apr 2007
Posts: 21
Topics: 4
Location: sw florida

PostPosted: Sun Aug 31, 2008 1:29 pm    Post subject: Reply with quote

computer,

Here is a shortcut that I used in a few of my REXX routines to access offsets.

In your REXX, you can invoke the FileAid Record Layout function. This will provide you with everything you need including datanames, starting position, length, etc.

Then you can read the FileAid record layout report into your REXX. I developed a REXX process that will actually convert the cobol layout to Eztrieve using this method. However, the code is to elaborate to post here.

I hope this helps
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Mon Sep 01, 2008 2:07 am    Post subject: Reply with quote

computer wrote:
Hi,
Kolusu, sorry to say that I have earlier mentioned that 'i can't submit a job'


you can invoke the cobol compiler in rexx in foreground mode, so, no need to submit a job.
Back to top
View user's profile Send private message
computer
Beginner


Joined: 12 Jun 2007
Posts: 64
Topics: 17
Location: Hyderabad

PostPosted: Mon Nov 10, 2008 4:12 am    Post subject: Reply with quote

hi,

Santlou, can u please provide the code,
by which u are handling the FILE-AID.....

Acevedo, i dont know how to invoke a batch compiler in rexx in forground mode...please help

Thanks,
Manoj
Back to top
View user's profile Send private message
Santlou
Beginner


Joined: 18 Apr 2007
Posts: 21
Topics: 4
Location: sw florida

PostPosted: Thu Nov 13, 2008 6:20 pm    Post subject: Reply with quote

Manoj,

Here is what your code should look like to invoke the FileAid Record Layout:

Of course you should tailor the code to meet your own needs, but it should give you the idea.

Code:
'ALLOC FILE(SYSTOTAL) DUMMY REUSE'               
'ALLOC FILE(SYSPRINT) DUMMY REUSE'               
"alloc dd(syslist) da('"lstdsn"') new catalog ", 
" reus dataclas(small) lrecl(150) recfm(f b)"     
"alloc dd(sysin) da(ispf.clist(abc)) shr"         
                                                 
queue "$$DD01 RLPRINT MEMBER=("cpymbr")"         
"execio "queued()" diskw sysin (finis"           
"free dd(sysin)"                                 
                                                 
"alloc dd(sysin) da(ispf.clist(abc)) shr"         
"ispexec select pgm(fileaid)"   


After you run this code, the lstdsn contains the FA record description with all the offsets and goodies. You would probably want to read that file in your rexx and extract the info that you need.

Hope this helps...
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Nov 14, 2008 2:00 pm    Post subject: Reply with quote

Invoking the compiler is the sme as invoking any other program - allocate the files and run the program i.e. have rexx pass it to the command environment which is what rexx does if it does not understand the value - e.g. on PC if you ask rexx to 'CLS' it does not know 'CLS' so it passes it to the operating system which then does a clear screen.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group