Page 1 of 1

Help with Old OS VS COBOL Statements

PostPosted: Tue Feb 07, 2017 3:58 am
by ramkumar1992sp
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.      

Re: Help with Old OS VS COBOL Statements

PostPosted: Tue Feb 07, 2017 4:09 am
by ramkumar1992sp
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.    

Re: Help with Old OS VS COBOL Statements

PostPosted: Tue Feb 07, 2017 4:23 am
by ramkumar1992sp
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.

Re: Help with Old OS VS COBOL Statements

PostPosted: Tue Feb 07, 2017 4:30 am
by BillyBoyo
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.

Re: Help with Old OS VS COBOL Statements

PostPosted: Tue Feb 07, 2017 9:21 pm
by ramkumar1992sp
Thanks Billyboyo.

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

Re: Help with Old OS VS COBOL Statements

PostPosted: Tue Feb 07, 2017 9:40 pm
by Robert Sample
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.

Re: Help with Old OS VS COBOL Statements

PostPosted: Tue Feb 07, 2017 9:59 pm
by ramkumar1992sp
Thanks Robert.

Re: Help with Old OS VS COBOL Statements

PostPosted: Wed Feb 08, 2017 11:25 am
by Aki88
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.

Re: Help with Old OS VS COBOL Statements

PostPosted: Wed Feb 08, 2017 7:56 pm
by ramkumar1992sp
Thanks Aki88.