View previous topic :: View next topic |
Author |
Message |
raj5174 Beginner
Joined: 24 May 2004 Posts: 2 Topics: 1
|
Posted: Mon May 24, 2004 10:37 am Post subject: Changes for OS/VS COBOL to VS COBOL II |
|
|
Hi,
In one of the programs in cobol 1 we are seeing
the below statements, we need to convert this to cobol
2. Could any one pls let me know what is the exact
Cobol-II equivalent of the below statement with out
changing the copy book structure
01 M12 PIC X(100) VALUE LOW-VALUES.
01 CIO REDEFINES M12 COPY CSRFG .
COPY BOOK CSRFG STRUCT
01 CIO.
02 FILLER PIC X(12).
02 TASKL COMP PIC S9(4).
--
--
01 CLUO REDEFINES CIO.
02 FILLER PIC X(12).
02 FILLER PICTURE X(2).
Thanks,
Raj |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Mon May 24, 2004 10:51 am Post subject: |
|
|
Raj,
Welcome to mvsforums. Please take a momemt to read the forum rules. A topic title like "cobol" does not explain any thing. Use meaningful topics. I am editing the title to reflect the requirement.
Coming to your question. There is NO version of cobol which is called COBOL 1. check this link for a history of cobol releases.
http://www-1.ibm.com/servers/eserver/zseries/zos/le/history/cobmvs.html
As for the changes I don't think you need any changes at all. I am sure that the above code you posted will compile without any problem with VS COBOL II
If you are getting an error during compilation please let us know and We will try to help you.
Hope this helps....
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Maton_Man Beginner

Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Mon May 24, 2004 7:47 pm Post subject: |
|
|
You should also be aware that COBOL II is no longer supported by IBM so your Uni / Training Course / Employer is way behind the times. _________________ My opinions are exactly that. |
|
Back to top |
|
 |
raj5174 Beginner
Joined: 24 May 2004 Posts: 2 Topics: 1
|
Posted: Tue May 25, 2004 11:07 am Post subject: |
|
|
Kolsu,
I am getting the following compiler messgae when i compiled it thru cobol 11. Could you please let me know how the code can be modified for this. This is cics program
I am pasting the code here.
01 MAP-AREA PIC X(100) VALUE LOW-VALUES.
01 CPI REDEFINES MAP-AREA COPY PLCMAP.
01 OCCURS-CLUMAP REDEFINES CLPO.
05 FILLER PIC X(84).
05 CLU-PRTS-PASS OCCURS 20 TIMES.
Copy Book PLCMAP
01 CPI.
02 FILLER PIC X(12).
02 TASKL COMP PIC S9(4).
02 TASKF PICTURE X.
02 TASKI PIC X(3).
01 CLPO REDEFINES CPI.
02 FILLER PIC X(12).
02 FILLER PICTURE X(2).
02 TASKA PICTURE X.
000214 021400 01 CPI REDEFINES MAP-AREA
000214==> IGYDS1159-E A "PICTURE" clause was not found for elementary item "CPI. PICTURE
X(1)" was assumed.
000215 COPY PLCMAP.
000216C 01 CPI.
000216==> IGYDS1082-E A period was required. A period was assumed before "01"
Thanks,
Raj |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Tue May 25, 2004 11:53 am Post subject: |
|
|
Raj,
These are pretty simple errors you can correct yourself. The compiler messages are clearly pointing what the error is.
Quote: |
000216==> IGYDS1082-E A period was required. A period was assumed before "01"
|
You missed a Fullstop(period) . after the Copy statement.
the copy statement should be follows
Note the period at the end
Fix this error and hopefully the other error will be gone.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
mok Beginner
Joined: 16 May 2003 Posts: 12 Topics: 0 Location: paris
|
Posted: Wed Jun 02, 2004 6:53 am Post subject: |
|
|
Hi Raj and Kolusu,
Sorry for the delay, maybe you found the solution by yourself
It's a simple problem when you did a lot of Cobol conversion like I did.
This program compile with a RC=O
Quote: |
identification division.
program-id. COBTST4.
data division.
working-storage section.
01 M12 PIC X(100) VALUE LOW-VALUES.
01 CIO REDEFINES M12.
replace ==01 CIO.== by == ==.
COPY CSRFG .
replace off.
procedure division.
DEBUT.
goback.
|
But I think you should remove the 01 lvl in the copybook. You cannot do a Cobol conversion without modifying obsolete code.
Cheers |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Wed Jun 02, 2004 3:43 pm Post subject: |
|
|
Hi,
I think the code SHOULD look like this:
Code: |
01 MAP-AREA PIC X(100) VALUE LOW-VALUES.
01 CPI REDEFINES MAP-AREA. COPY PLCMAP. <== note the added (.) after map-area
01 OCCURS-CLUMAP REDEFINES CLPO.
05 FILLER PIC X(84).
05 CLU-PRTS-PASS OCCURS 20 TIMES.
Copy Book PLCMAP
01 CPI. <== this must be deleted or commented out of the copybook
02 FILLER PIC X(12).
02 TASKL COMP PIC S9(4).
02 TASKF PICTURE X.
02 TASKI PIC X(3).
01 CLPO REDEFINES CPI.
02 FILLER PIC X(12).
02 FILLER PICTURE X(2).
02 TASKA PICTURE X.
|
The rusulting code will be:
Code: |
01 MAP-AREA PIC X(100) VALUE LOW-VALUES.
01 CPI REDEFINES MAP-AREA.
02 FILLER PIC X(12).
02 TASKL COMP PIC S9(4).
02 TASKF PICTURE X.
02 TASKI PIC X(3).
01 CLPO REDEFINES CPI.
02 FILLER PIC X(12).
02 FILLER PICTURE X(2).
02 TASKA PICTURE X.
01 OCCURS-CLUMAP REDEFINES CLPO.
05 FILLER PIC X(84).
05 CLU-PRTS-PASS OCCURS 20 TIMES.
|
Regards, Jack. |
|
Back to top |
|
 |
mok Beginner
Joined: 16 May 2003 Posts: 12 Topics: 0 Location: paris
|
Posted: Thu Jun 03, 2004 3:23 am Post subject: |
|
|
Hi Jack,
I agree with you but Raj's aim is to keep the copybook unchanged that is not very logical. Generally, in this kind of project you maintain 2 versions of copys (old / new) until the end of the project.
Cheers |
|
Back to top |
|
 |
|
|