Help needed

This is a discussion on Help needed within the cobol forums in Programming Languages category; Hi all! Could anybody resolve my troubles, please? I'd like to work with to PCB by using the same procedure. Main idea is as follow. .. . . WORKING-STORAGE SECTION. 01 PCB-X PIC x(20). LINKAGE SECTION. 01 PCB-1 PIC X(20). 01 PCB-2 PIC X(20). PROCEDURE DIVISION. ENTRY 'DLITCBL' USING PCB-1 PCB-2 100-MAIN. .. . . IF condition MOVE PCB-1 TO PCB-X ELSE MOVE PCB-2 TO PCB-X. PERFORM 200-PROCEDURE. 200-PROCEDURE. .. . . . . do something with PCB-X .. . . . MOVE does not work. But with solution could be used here? Thanks....

Go Back   Application Development Forum > Programming Languages > cobol

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-30-2008, 05:21 AM
AlexV
Guest
 
Default Help needed

Hi all!
Could anybody resolve my troubles, please?
I'd like to work with to PCB by using the same procedure.
Main idea is as follow.

.. . .
WORKING-STORAGE SECTION.
01 PCB-X PIC x(20).

LINKAGE SECTION.
01 PCB-1 PIC X(20).
01 PCB-2 PIC X(20).

PROCEDURE DIVISION.
ENTRY 'DLITCBL' USING PCB-1 PCB-2

100-MAIN.
.. . .
IF condition
MOVE PCB-1 TO PCB-X
ELSE
MOVE PCB-2 TO PCB-X.
PERFORM 200-PROCEDURE.


200-PROCEDURE.
.. . . . .
do something with PCB-X
.. . . .

MOVE does not work. But with solution could be used here?

Thanks.
Reply With Quote
  #2  
Old 07-30-2008, 06:25 AM
William M. Klein
Guest
 
Default Re: Help needed

(For those in comp.lang.cobol who don't recognize this, is IBM - IMS).

Does the PSB actually have two PCB's defined - or are PCB-1 and PCB-2 actually
supposed to be "redefinitions" of a single PCB? When you say it doesn't work,
what symptom are you getting? Finally, are you certain that the condition that
you are testing for is correct and that it is going to the right branch of your
IF statement?

P.S. What IBM COBOL compiler are you using? (release and version) and what
release and version of IBM are you using? Is this an online, batch, or bmp job?
Do you have an interactive debugger so you can see what is happening (e.g.
Xpediter or Debug Tool - with BTS)?

--
Bill Klein
wmklein <at> ix.netcom.com
"AlexV" <ali_vas@mail.ru> wrote in message
news:1ae2c999-0713-4479-8d0d-b41f2b72eeea@34g2000hsh.googlegroups.com...
> Hi all!
> Could anybody resolve my troubles, please?
> I'd like to work with to PCB by using the same procedure.
> Main idea is as follow.
>
> . . .
> WORKING-STORAGE SECTION.
> 01 PCB-X PIC x(20).
>
> LINKAGE SECTION.
> 01 PCB-1 PIC X(20).
> 01 PCB-2 PIC X(20).
>
> PROCEDURE DIVISION.
> ENTRY 'DLITCBL' USING PCB-1 PCB-2
>
> 100-MAIN.
> . . .
> IF condition
> MOVE PCB-1 TO PCB-X
> ELSE
> MOVE PCB-2 TO PCB-X.
> PERFORM 200-PROCEDURE.
>
>
> 200-PROCEDURE.
> . . . . .
> do something with PCB-X
> .. . . .
>
> MOVE does not work. But with solution could be used here?
>
> Thanks.



Reply With Quote
  #3  
Old 07-30-2008, 07:42 AM
AlexV
Guest
 
Default Re: Help needed

Hi, Bill!
Thank you for your message.
PCB-1 and PCB-2 are different PCBs in PSB. They are linked with
different files. And I want to write to one or another of them depend
of any condition. Condition works correctly.
I receive user code 476 from batch. As I can see from trace,
interruption occures on CALL CBLTDLI ....
From ABENDAID "A DL/I call did not include a valid PCB address." and
some possible reasons.

This program works well when I obviously give names of PCBs in called
procedure. But in this case I mus have two similar procedures, that
differs only that names. Now I must work with four files, so this way
is not very good.

I use COBOL LE for zOS.
I can use ASG as debugger. But I don't sure that it gives more
information.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:16 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.