Help with Old OS VS COBOL Statements



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Help with Old OS VS COBOL Statements

Postby ramkumar1992sp » Tue Feb 07, 2017 3:58 am

I have some old COBOL programs and I need to convert them to Enterprise COBOL.

I have this Select statement.

SELECT  SEC-FLWK ASSIGN TO DA-R-SYS052  
    ACCESS RANDOM NOMINAL KEY NOM.      
 

What does the above NOMINAL key word mean ?

Can I just remove the NOMINAL keyword it as it says in the below link ?

https://www.ibm.com/support/knowledgece ... mst126.htm


I also get the below error

THE "ACCESS MODE" SPECIFIED FOR FILE "SEC-FLWK", WHICH HAD "SEQUENTIAL" ORGANIZA
SEQUENTIAL".  "ACCESS MODE SEQUENTIAL" WAS ASSUMED.  



The file concerned is temporary so I couldnt do a listcat.I will try to create it as a non temporary file and look at its properties tomorrow.

The read statement is made as if it were a Random access file.


MOVE C-S-KEY (CRS) TO NOM.                          
READ SEC-FLWK INVALID KEY   DISPLAY                  
    'INVALID READ KEY=' NOM GO TO 290-IO-ERR.        
MOVE SPACE TO S-RCDWK.                              
 



Can someone please explain me why I get the below error ?

THE "ACCESS MODE" SPECIFIED FOR FILE "SEC-FLWK", WHICH HAD "SEQUENTIAL" ORGANIZA
SEQUENTIAL".  "ACCESS MODE SEQUENTIAL" WAS ASSUMED.      
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Help with Old OS VS COBOL Statements

Postby ramkumar1992sp » Tue Feb 07, 2017 4:09 am

Below is the complete message..

THE "ACCESS MODE" SPECIFIED FOR FILE "SEC-FLWK", WHICH HAD "SEQUENTIAL" ORGANIZATION, WAS NOT "ACCESS MODE
SEQUENTIAL"
.  "ACCESS MODE SEQUENTIAL" WAS ASSUMED.    
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Help with Old OS VS COBOL Statements

Postby ramkumar1992sp » Tue Feb 07, 2017 4:23 am

Below is how the file is created.
//SYS052   DD DSN=&&TEMP,DISP=(,DELETE),UNIT=SYSDA,            
 //            DCB=(LRECL=80,RECFM=F,BLKSIZE=80),                
 //            SPACE=(80,(2000,500),RLSE)                        
 


I apologize for taking multiple posts to post the relevant information.
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Help with Old OS VS COBOL Statements

Postby BillyBoyo » Tue Feb 07, 2017 4:30 am

This is for a "DA" data set. I don't know when those ceased to be supported in IBM COBOL, but a while ago.

You will replace it with a VSAM KSDS, and make a SELECT appropriate for that.

I think this COBOL program may have originated on DOS/VS, the SYSnnn is more at home there, but maybe just an inherited style.

These users thanked the author BillyBoyo for the post:
ramkumar1992sp (Tue Feb 07, 2017 9:59 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Help with Old OS VS COBOL Statements

Postby ramkumar1992sp » Tue Feb 07, 2017 9:21 pm

Thanks Billyboyo.

I tried looking up for DA datasets but didn't find enough documentation.Is it same as a BDAM dataset ?
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Help with Old OS VS COBOL Statements

Postby Robert Sample » Tue Feb 07, 2017 9:40 pm

Yes, BDAM is the access method for a COBOL DA data set. It could be replaced by a VSAM RRDS or KSDS, depending upon the application.

These users thanked the author Robert Sample for the post:
ramkumar1992sp (Tue Feb 07, 2017 9:59 pm)
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Help with Old OS VS COBOL Statements

Postby ramkumar1992sp » Tue Feb 07, 2017 9:59 pm

Thanks Robert.
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time

Re: Help with Old OS VS COBOL Statements

Postby Aki88 » Wed Feb 08, 2017 11:25 am

Hello,

ramkumar1992sp wrote:...I tried looking up for DA datasets but didn't find enough documentation.Is it same as a BDAM dataset ?


In general if one ever gets stuck in trying to figure out how/what a data set type is, the best place to start the search is DFSMS Using Data Sets; Look at the chapter: 'Processing Direct Data Sets'.

Hope this helps.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Help with Old OS VS COBOL Statements

Postby ramkumar1992sp » Wed Feb 08, 2017 7:56 pm

Thanks Aki88.
ramkumar1992sp
 
Posts: 71
Joined: Sat Jul 23, 2016 8:52 am
Has thanked: 40 times
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post