MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Assembler DCB Addressability

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
MuthuS
Beginner


Joined: 21 Jun 2006
Posts: 4
Topics: 2

PostPosted: Mon Nov 06, 2006 6:01 am    Post subject: Assembler DCB Addressability Reply with quote

I am working in ASM to COBOL conversion project. In one of the assembler program being converted, a record is written into the file after establishing the DCB addressability. This file is being defined in some other ASM program which is not converted in this phase.

So how do I write equivalent code in COBOL w/o file declaration. Please note that this file being written in other program also.

The asm instructions are:

L R7,FMRENDCB LOAD ADDRESS OF RENEWAL DCB
PUT 0(R7),MAGRENW WRITE RENEWAL RECORD TO IT

Any help will be appreciated

Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Nov 06, 2006 7:25 am    Post subject: Reply with quote

I wonder why you do not want the file declaration. Do you want to 'dynamically' allocate the file? If so, you should review PUTENV and BPXWDYN.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
MuthuS
Beginner


Joined: 21 Jun 2006
Posts: 4
Topics: 2

PostPosted: Mon Nov 06, 2006 7:59 am    Post subject: Reply with quote

As stated, this file is being used by prior calling programs. In case of any exception, this program writes a record to the same file. Just for writing a record, I dont want to declare/open/write/close etc which will lead to lot of IO and performance issues and also increases the effort on regressive testing.

I prefer something thats exactly same as ASM stuff in COBOL for this.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Nov 06, 2006 9:46 am    Post subject: Reply with quote

well, what the orig asm pgm was doing:
was accepting an address of the dcb that is open (another asm module) FMRENDCB
loading that dcb to a register in active asm module
executing a PUT against the dcb.

can't do that in cobol. in asm you can pass the 'file' (dcb) around to other modules. With COBOL, you can't pass the 'file' around. It seems your conversion design is flawed. even with the original asm process you are writing a record to 'current record position'. I don't understand your process. what you have stated:

1. read record from file 1.
2. CALL sub-module ......
3. in sub-sub-module write record file 1.

if you can clarify your process, there will probably be more responses to you question.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
MuthuS
Beginner


Joined: 21 Jun 2006
Posts: 4
Topics: 2

PostPosted: Tue Nov 07, 2006 8:38 am    Post subject: Reply with quote

Thanks Dick.

BTW, here is how it goes...

We have 200+ ASM / COBOL programs being called in weekly processing stream. The scope of this project is to convert the heavily used ASM modules into COBOL in the first phase. The program which I am about to convert establish the addressability to already opened DCB and writes the record in different format (The file is VB). There will be down processing which I dont need to bother in unit testing stage.( May be later in system testing..)

For now, I just need to convert this ASM program to COBOL and the outputs of baseline (ASM version) and (COBOL) unit test should match.

What I could understand from your mail is that is not possible in COBOL. Let me check with our experts and manuals whether this can be implemented in any round about way in COBOL. If you have any idea, please share.

I am glad to provide any additional information required.

Thanks again for your response.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group