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

need to convert Cobol structure to PL1 structure


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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
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: 2146
Location: At my coffee table

PostPosted: Thu Jul 26, 2007 9:39 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


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