| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| >>> On 7/30/2008 at 5:42 AM, in message <d7a239bc-8f11-481d-8c9f-31a352c85010@z72g2000hsb.googlegroups.com>, AlexV<ali_vas@mail.ru> wrote: > 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. I think you need to change it a bit, like this: LINKAGE SECTION. 01 PCB-1 PIC X(20). 01 PCB-2 PIC X(20). 01 PCB-X PIC x(20). PROCEDURE DIVISION. ENTRY 'DLITCBL' USING PCB-1 PCB-2 100-MAIN. .. . . IF condition SET ADDRESS OF PCB-X TO ADDRESS OF PCB-1 ELSE SET ADDRESS OF PCB-X TO ADDRESS OF PCB-2. PERFORM 200-PROCEDURE. I have done something similar. I would be curious to see what you full CALL CBLTDLI statement looks like. I have something like this: CALL 'CBLTDLI' USING DLI-FUNC PCB-MASK DMDMSTR SSA-AREA PERFORM 8900-HANDLE-DLI-RESULT where PCB-MASK is PCB-X in your example and is defined like this: 01 PCB-MASK. 05 PCB-DB-NAME PIC X(8). 05 PCB-SEG-LEVEL PIC XX. 05 PCB-STATUS PIC XX. 88 PCB-SUCCESSFUL VALUE ' '. 88 PCB-DB-AT-END VALUE 'GB'. 88 PCB-REC-NOT-FOUND VALUE 'GE'. 88 PCB-NO-PARENT VALUE 'GP'. 88 PCB-ALREADY-EXISTS VALUE 'II'. 05 PCB-PROC-OPTS PIC X(4). 05 PIC S9(5) COMP. 05 PCB-SEG-NAME PIC X(8). 05 PCB-SEG-KEY-LEN PIC S9(5) COMP. 05 PCB-NBR-SENS-SEGS PIC S9(5) COMP. 05 PCB-SEG-KEY. 10 PCB-SEG-KEY-BYTE PIC X OCCURS 0 TO 100 TIMES DEPENDING ON PCB-SEG-KEY-LEN. 8900-HANDLE-DLI-RESULT then can deal with PCB-STATUS or whatever is needed. Frank |
|
#2
| |||
| |||
| I agree with Frank. If you are trying to use the PCB in WS rather than one of the ones in LS, then you will have a problem. You can't just "move the content" of the LS version to the WS one and then use it in your CALL to CBLTDLI. If it is the CALL that you want to have one of the two various PCBs, then Frank's "SET ADDRESS' approach should work for you. If you were actually using one of the two original LS PCBs for your call to CBLTDLI, then I think we need to see a little bit more of the logic to understand the problem. -- Bill Klein wmklein <at> ix.netcom.com "Frank Swarbrick" <Frank.Swarbrick@efirstbank.com> wrote in message news:48904B4B.6F0F.0085.0@efirstbank.com... >>>> On 7/30/2008 at 5:42 AM, in message > <d7a239bc-8f11-481d-8c9f-31a352c85010@z72g2000hsb.googlegroups.com>, > AlexV<ali_vas@mail.ru> wrote: >> 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. > > I think you need to change it a bit, like this: > > LINKAGE SECTION. > 01 PCB-1 PIC X(20). > 01 PCB-2 PIC X(20). > > 01 PCB-X PIC x(20). > > PROCEDURE DIVISION. > ENTRY 'DLITCBL' USING PCB-1 PCB-2 > > 100-MAIN. > . . . > IF condition > SET ADDRESS OF PCB-X TO ADDRESS OF PCB-1 > ELSE > SET ADDRESS OF PCB-X TO ADDRESS OF PCB-2. > PERFORM 200-PROCEDURE. > > > I have done something similar. I would be curious to see what you full CALL > CBLTDLI statement looks like. > > I have something like this: > > CALL 'CBLTDLI' USING DLI-FUNC > PCB-MASK > DMDMSTR > SSA-AREA > PERFORM 8900-HANDLE-DLI-RESULT > > > where PCB-MASK is PCB-X in your example and is defined like this: > > 01 PCB-MASK. > 05 PCB-DB-NAME PIC X(8). > 05 PCB-SEG-LEVEL PIC XX. > 05 PCB-STATUS PIC XX. > 88 PCB-SUCCESSFUL VALUE ' '. > 88 PCB-DB-AT-END VALUE 'GB'. > 88 PCB-REC-NOT-FOUND VALUE 'GE'. > 88 PCB-NO-PARENT VALUE 'GP'. > 88 PCB-ALREADY-EXISTS VALUE 'II'. > 05 PCB-PROC-OPTS PIC X(4). > 05 PIC S9(5) COMP. > 05 PCB-SEG-NAME PIC X(8). > 05 PCB-SEG-KEY-LEN PIC S9(5) COMP. > 05 PCB-NBR-SENS-SEGS PIC S9(5) COMP. > 05 PCB-SEG-KEY. > 10 PCB-SEG-KEY-BYTE PIC X > OCCURS 0 TO 100 TIMES > DEPENDING ON PCB-SEG-KEY-LEN. > > 8900-HANDLE-DLI-RESULT then can deal with PCB-STATUS or whatever is needed. > > Frank > |
|
#3
| |||
| |||
| Frank and Bill! I'm greatly appreciate for your advise! It works of course! Thank you for your help! |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.