Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
need to convert Cobol structure to PL1 structure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Thu Jul 26, 2007 6:41 pm    Post subject: need to convert Cobol structure to PL1 structure
Reply with quote

Hi,

In my requirement, i need to convert the following cobol structure in to pl1 structure without affecting its LRECL.

01 A.
05 B PIC X(20).
05 C PIC X(20) REDEFINES B.
07 C PIC X(10).
07 D PIC X(10).
05 E PIC X(20).

I don't know anything in COBOL. please help me out in this.
Back to top
View user's profile Send private message

senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Thu Jul 26, 2007 6:42 pm    Post subject: Re: need to convert Cobol structure to PL1 structure
Reply with quote

I tried some possibilities, but LRECL is getting affected
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Jul 26, 2007 9:39 pm    Post subject:
Reply with quote

Please post what you tried, I'm not a PLI person, but I might be able to help.
Back to top
View user's profile Send private message
anbesivam

New User


Joined: 22 Aug 2006
Posts: 5

PostPosted: Thu Jul 26, 2007 10:28 pm    Post subject: Re: need to convert Cobol structure to PL1 structure
Reply with quote

Hi Senjey,

Please check the following code..

Code:
DCL 1 A,
        2 B PIC X(20),
           5 C PIC X(20) DEF B,
              7 C PIC X(10),
              7 D PIC X(10),
           5 E PIC X(20);


I didn't tried practically. But I'm sure, It will work.

Hope this helps.
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Fri Jul 27, 2007 8:01 am    Post subject: Re: need to convert Cobol structure to PL1 structure
Reply with quote

Thanks all,

I already tried the DEF. but LRECL is getting affected. the structure in cobol format is having length of 60 bytes. but when i tried with DEF in pl1, it is giving 80 bytes. any other way?
Back to top
View user's profile Send private message
anbesivam

New User


Joined: 22 Aug 2006
Posts: 5

PostPosted: Fri Jul 27, 2007 7:28 pm    Post subject: Re: need to convert Cobol structure to PL1 structure
Reply with quote

As you cannot use 'Miner' structure with DEF, Could please try following code and let us know.

Structure A's STG is 60.

Code:
DCL 1 A,                   
      2 B union,           
        3 B1 PIC '(20)X', 
      2 C union,           
        3 C1 PIC '(20)X', 
        3 C2 PIC '(10)X', 
        3 D PIC  '(10)X', 
      2 E PIC '(20)X';     
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display offset thru cobol prog... tvinodkumar7 CICS 1 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us