View previous topic :: View next topic |
Author |
Message |
computer Beginner
Joined: 12 Jun 2007 Posts: 64 Topics: 17 Location: Hyderabad
|
Posted: Mon Aug 04, 2008 7:19 am Post subject: REXX(I/p-Cobol Copybook,O/p-var. with offset loc n len |
|
|
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 |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Mon Aug 04, 2008 7:27 am Post subject: |
|
|
I hope you are very familiar with COBOL and REXX! |
|
Back to top |
|
 |
computer Beginner
Joined: 12 Jun 2007 Posts: 64 Topics: 17 Location: Hyderabad
|
Posted: Mon Aug 04, 2008 8:06 am Post subject: |
|
|
Hi,
I am comfortable with Cobol and related to REXX, dont have an expert hand experience.
Please help me.
Thanks |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Mon Aug 04, 2008 8:57 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
computer Beginner
Joined: 12 Jun 2007 Posts: 64 Topics: 17 Location: Hyderabad
|
Posted: Thu Aug 07, 2008 8:09 am Post subject: |
|
|
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 |
|
 |
Santlou Beginner
Joined: 18 Apr 2007 Posts: 21 Topics: 4 Location: sw florida
|
Posted: Sun Aug 31, 2008 1:29 pm Post subject: |
|
|
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 |
|
 |
acevedo Beginner

Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Mon Sep 01, 2008 2:07 am Post subject: |
|
|
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 |
|
 |
computer Beginner
Joined: 12 Jun 2007 Posts: 64 Topics: 17 Location: Hyderabad
|
Posted: Mon Nov 10, 2008 4:12 am Post subject: |
|
|
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 |
|
 |
Santlou Beginner
Joined: 18 Apr 2007 Posts: 21 Topics: 4 Location: sw florida
|
Posted: Thu Nov 13, 2008 6:20 pm Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Nov 14, 2008 2:00 pm Post subject: |
|
|
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 |
|
 |
|
|