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

Generating Easytrieve layout from COBOL source


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Mar 04, 2009 9:58 am
Reply with quote

Hi Jasorn,

Cool icon_wink.gif

Quote:
I was planning to use the cobol 2 eztrieve converter that comes with eztrieve somehow but never could get that to work well with redefines and occurs
If you are still interested in generating Easytrieve layouts from a cobol copybook, post something in the CA part of the forum. I've recently generated some for a client.

d
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: Wed Mar 04, 2009 9:15 pm
Reply with quote

Hello,

Quote:
does that mean the one that comes with eztrieve is ;broken' and it's not just me?
Easytrieve wasn't "broken" but it did take a bit of "fiddling around" - all i did was work with the easytrieve macros to see what they were doing/expecting and the set up my jobs so they conformed. My biggest hurdle was realizing that the CBLCNVRT process is cobol compiler dependent. . .
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Thu Mar 05, 2009 5:07 am
Reply with quote

dick scherrer wrote:

Easytrieve wasn't "broken" but it did take a bit of "fiddling around" - all i did was work with the easytrieve macros to see what they were doing/expecting and the set up my jobs so they conformed. My biggest hurdle was realizing that the CBLCNVRT process is cobol compiler dependent. . .


Yeah. I did get it to work but the problem is I've never gotten it to handle occurs clauses or redefines. Does CBLCNVRT handles those and I was just to dumb to figure it out?

Also there's currently an implementation of CBLCNVRT someone at my company put together. It's a screen you pass it the copybook name and it uses CBLCNVRT to create the eztrieve. It has the same issue I always had: give it some occurs and redefines and it pukes.
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 Mar 05, 2009 6:57 am
Reply with quote

Hi Jasorn,

Quote:
Does CBLCNVRT handles those and I was just to dumb to figure it out?
I suspect it wasn't you icon_wink.gif Over time there have been bugs fixed. A problem i had once upon a time was that any numeric definition was converted to alpha.

I did create one today that has occurs, redefines and at least one odo just for testing this. It also has binary, packed-decimal and zoned-decimal fields in additon to pic x fields.

If you can send me a PM with a problem cobol definition as a .txt attachment, i'll see if i can generate good easytrieve or if it has a problem.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Fri Mar 06, 2009 4:03 pm
Reply with quote

Hi

I too have a tool to convert COBOL layout to EZT MACRO . First we convert the COBOL layout to FILEAID layout through batch JCL and in the next STEP use a REXX to read the FILEAID layout and make a new EZT macro from it . For OCCURS it appends number in ascending order for the variable in the macro . Like
Code:
03  :AMBS:-WAIVE-SVC-CHG               OCCURS 10 TIMES     
                                   INDEXED BY X-:AMBS:-WSC 
                        PIC 9.                             
is converted to
Code:
AMBS-WAIVE-SVC-CHG-1 
AMBS-WAIVE-SVC-CHG-2 
AMBS-WAIVE-SVC-CHG-3 
AMBS-WAIVE-SVC-CHG-4 
AMBS-WAIVE-SVC-CHG-5 
AMBS-WAIVE-SVC-CHG-6 
AMBS-WAIVE-SVC-CHG-7 
AMBS-WAIVE-SVC-CHG-8 
AMBS-WAIVE-SVC-CHG-9 
AMBS-WAIVE-SVC-CHG-10
in the macro. There is one issue , for a binary variable , the macro variable is packed . This is because in the intermediate fileaid layout , you cannot distinguish between a binary variable and comp variable.

I was just enquiring weather you are using a similar approach or different one . If you can let me know the STEPS of approach it will help us improve upon the tool . We don't use CBLCNVRT.
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: Fri Mar 06, 2009 8:56 pm
Reply with quote

Hello,

If you have Easytrieve, i suggest you try CBLCNVRT.

I don't understand why an array is changed to individually named fields icon_confused.gif This might make some trivial bit of code "grow" to where it might become unmanagable?

With CBLCNVRT cobol arrays become easytrieve arrays.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Mar 06, 2009 9:06 pm
Reply with quote

When using CBLCNVRT you run a COBOL compile of a stub module with the copybook. Then read the compile listing into the Easytrieve program.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Mar 06, 2009 9:12 pm
Reply with quote

The "array is changed to individually named fields" probably because that is the way the FileAid "View Record Layout" works.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Fri Mar 06, 2009 11:18 pm
Reply with quote

Yes Douglas , in the fileaid the above fields are converted to
Code:
3 :AMBS:-WAIVE-SVC-CHG(1)
                         
3 :AMBS:-WAIVE-SVC-CHG(2)
3 :AMBS:-WAIVE-SVC-CHG(3)
3 :AMBS:-WAIVE-SVC-CHG(4)
3 :AMBS:-WAIVE-SVC-CHG(5)
3 :AMBS:-WAIVE-SVC-CHG(6)
3 :AMBS:-WAIVE-SVC-CHG(7)
3 :AMBS:-WAIVE-SVC-CHG(8)
3 :AMBS:-WAIVE-SVC-CHG(9)
3 :AMBS:-WAIVE-SVC-CHG(10)
hence in the final macro also we have a similar format , as it's easier and less complicated to process into.

However some issue like the binary field one , mentioned earlier , still remains. For other practical purpose it works fine and i think those who do not use CBLCNVRT can use this logic effectively.
I was not aware of the utility CBLCNVRT . But i checked our system and we are using 'CA-EASYTRIEVE PLUS-6.4 0311' so i think this utility will be there also here. I searched this forum and found that you have posted some material regarding how to use CBLCNVRT , i will try them out and let you know if i get stuck anywhere . It is a good experience to know a new utility .
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: Fri Mar 06, 2009 11:28 pm
Reply with quote

Hello,

Quote:
I was not aware of the utility CBLCNVRT
Many are not. . . I'm not sure why it is so little known icon_confused.gif It has been available for years.

Quote:
But i checked our system and we are using 'CA-EASYTRIEVE PLUS-6.4 0311' so i think this utility will be there also here.
Yes, it is - you may need an update to the CBLCNVRT macros to handle the newer versions of the compiler as well as incorporate some bug fixes.

Good luck icon_smile.gif
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Mon Mar 09, 2009 4:06 pm
Reply with quote

Hi Douglas

Need some help. I referred your earlier post in the following link ---> ibmmainframes.com/viewtopic.php?t=24280&highlight=cblcnvrt

The first STEP i was able to execute successfully and create the GLOSSARY table containing the loadmodule . I am facing issues while running the CBLCNVRT step.

Code:
000008 //STEP02    EXEC PGM=EZTPA00                                     
000009 //*TEPLIB   DD   DSN=IDC.EASYPLUS,DISP=SHR                       
000010 //EZTVFM   DD UNIT=SYSDA,SPACE=(CYL,(5,5))                       
000011 //SYSPRINT  DD SYSOUT=*                                           
000012 //GLOSTAB   DD  DSN=&SYSUID..GLOSSARY.TABLE,DISP=SHR             
000013 //*ANDD1    DD   DSN=IDC.PANAUDIT.PLUS30C.PANLIB,DISP=SHR         
000014 //EASYPGM   DD  DSN=&SYSUID..CBLCNVRT.OUTPUT,DISP=(NEW,CATLG),   
000015 //          DCB=(LRECL=80,RECFM=FB,BLKSIZE=0),                   
000016 //          UNIT=SYSDA,SPACE=(CYL,(30,30),RLSE)                   
000017 //SYSIN DD *                                                     
000018 %CBLCNVRT GLOSTAB                                                 
000019 /*                                                               


I removed STEPLIB and PANDD1 DD as the one mentioned by you are not in our system and i don't think it's required. The macro CBLCNVRT is there in our system library SYS4.EZTRIEVE.CAIMAC .
Also i haven't given cobol compiler version option as it takes the default.
But the easytreive is giving the following error
Code:
       *******B006 MACRO SYSTEM - PDS , ERROR IN MACRO FILE         
     1 %CBLCNVRT GLOSTAB                                           
       *******B076 REMAINDER OF STATEMENT IS IGNORED               
       *******B059 PREMATURE END OF FILE                           
       *******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S)   


I thought that there might be an error in the SYS4.EZTRIEVE.CAIMAC library while reading , so i gave a AUDMACS library for this in the JCL . This time it ran successfully but the output was empty.

Have you encountered with this type of issue . If yes can you let me know the resolution .
Thanks
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: Mon Mar 09, 2009 7:06 pm
Reply with quote

Hello,

Quote:
and i don't think it's required
Why would you believe this? This is the DD where %CBLCNVRT macros are located. . . The ddname might not be PANDD1. It is locally specified. On one of my systems it is PANDD. . .

Suggest you change this:
Code:
%CBLCNVRT GLOSTAB
to this:
Code:
%CBLCNVRT GLOSTAB COBOL I341
assuming you are using Enterprise cobol 3.4.n.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Mon Mar 16, 2009 6:35 pm
Reply with quote

Hi Dick

I have tried the changes suggested by you , it's still giving the same error . I tried with giving PANDD and PANDD1 with SYS4.EZTRIEVE.CAIMAC as it contains the %CBLCNVRT macro. Is there anything i need to do further.
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: Tue Mar 17, 2009 2:55 am
Reply with quote

Hello,

Is the person who installed Easytrieve still available?

One part of the install is to define the Options Table. One of the parameters of the Options Table is MACDD which specifies the ddname for the macro library to be used. It doesn't much matter what is in the jcl if it is not the name specified. . .

Also, Easytrieve supports multiple ways of storing macros - among them are Panvalet, Librarian, VSAM, and partitioned datasets. Is it possible that your installation uses something other than a pds for the macro library?

Another consideraton is that the CAIMAC lib comes with the install media and might not be where the installer intended for applications to reference.
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: Tue Mar 17, 2009 6:33 am
Reply with quote

A bit more. . .

In the library where EZTPA00 executes from, look for a module named MACADD. In that module look for the literal MACADD. About 20 bytes to the rignt of this literal you may see the ddname you need to use in the cblcnvrt jcl. This won't show correctly if the macro library is a not pds (is something else). Still, might be worth a shot.

d
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Thu Mar 19, 2009 4:22 pm
Reply with quote

dick scherrer wrote:


Is the person who installed Easytrieve still available?



Is there any way to find out the contact person for the same , i mean can the information retrieved through HELP command ar any section in ISPF menu . For each utility installed in the mainframe there must be a support group or contact person but as our organization does not own the mainframe , i am afraid i don't have any clue to find the right person to talk to.
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 Mar 19, 2009 7:30 pm
Reply with quote

Hello,

Unless the installer specifically put something in the Help pages, there probably is nothing.

Finding "who" in another organization may take some effort. . . I'd find the person responsible for cobol on the system and ask who supports easytrieve.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Mon Mar 23, 2009 9:49 pm
Reply with quote

Hi Dick

Thanks a lot for your help . I am finally able to execute the CBLCNVRT macro tool.



Code:
//STEP02    EXEC PGM=EZTPA00                                     
//EZTVFM   DD UNIT=SYSDA,SPACE=(CYL,(5,5))                       
//SYSPRINT  DD SYSOUT=*                                         
//GLOSTAB   DD DSN=&SYSUID..GLOSSARY.TABLE,DISP=SHR             
//AUDMACS   DD DSN=SYS4.EZTRIEVE.CAIMAC,DISP=SHR                 
//SYSIN DD *                                                     
%CBLCNVRT GLOSTAB (NUMDEF 3000)  COBOL II12                     
/*                                                               
//EASYPGM   DD DSN=&SYSUID..CBLCNVRT.OUTPUT,DISP=(NEW,CATLG),   
//          DCB=(LRECL=80,RECFM=FB,BLKSIZE=0),                   
//          UNIT=SYSDA,SPACE=(CYL,(30,30),RLSE)                 


PANDD step is not necessary as AUDMACS can do the needful in this case.
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: Mon Mar 23, 2009 9:54 pm
Reply with quote

Quote:
I am finally able to execute the CBLCNVRT macro tool.
Good to hear icon_smile.gif

Quote:
PANDD step is not necessary as AUDMACS can do the needful in this case.
Yup, the DD is often not PANDD, but some other MAClib. How did you find AUDMACS?

d
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Tue Mar 24, 2009 11:12 am
Reply with quote

Refer the following CA Panaudit forum link.
In the second question , posted in the above link , it's mentioned that for running CBLCNVRT Panaudit is not required . Hence i dropped the idea for doing more analysis on PANDD statements . I thought that as CBLCNVRT is a macro let's include this in the AUDMACS library and see the outcome . You had already mentioned earlier , in one of your posts in this forum, that SYS4.**.CAIMAC system library contains the CBLCNVRT macro . I searched for the same , and as it was here in our mainframe , i just included the same in AUDMACS library . It just clicked icon_biggrin.gif
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: Tue Mar 24, 2009 7:30 pm
Reply with quote

Thanks for the info - it will probably help someone else later icon_smile.gif

d
Back to top
View user's profile Send private message
rammohan paulrajan

New User


Joined: 28 Nov 2007
Posts: 11
Location: chennai

PostPosted: Wed Dec 08, 2010 12:43 pm
Reply with quote

Hi,
I tried using this JCL to convert my cobol copy book into eztrieve one. I am getting following error on the CBLCNVRT tool

153 DEPENDING_ON_NAME * 40 A
153 *******B055 INVALID LENGTH, TYPE OR DECIMAL PLACES - 40

Do i need to modify anything in the JCL for this since this variable is present in the CBLCNVRT
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: Wed Dec 08, 2010 8:27 pm
Reply with quote

Hello,

It may help if you post some more of the Easytrieve layout and the corresponding COBOL code.

There was a time when CBLCNVRT did not do well with occurs depending on. This may still be true.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top