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 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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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