![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I can't believe I can't get this CALLX test to work. I must be doing something stupid. Here are the basics: File CLIFF.TEST exists and contains a CALLX statement in attribute 8 of the data d-pointer. CT DICT CLIFF.TEST CLIFF.TEST CLIFF.TEST 001 D 002 $(MDS):$(MD)/CLIFF.TEST/CLIFF.TEST/CLIFF.TEST 003 3 004 005 006 007 008 CALLX CLIFF.UPDATE 009 010 The program CLIFF.UPDATE is FLASHED and CATALOGED in the account in which I am working. CT CLIFF.BP CLIFF.UPDATE CLIFF.UPDATE 001 SUBROUTINE CLIFF.UPDATE(ITEM) 002 * 003 OPEN 'CLIFF.LOG' TO F.LOG ELSE RETURN 004 READ LOG.ITEM FROM F.LOG,'LOG.CNT' ELSE LOG.CNT = 0 005 LOG.CNT = LOG.CNT + 1 006 WRITE LOG.ITEM ON F.LOG,'LOG.CNT' 007 * 008 RETURN 008 * 009 END |
|
If I add a new item item to the CLIFF.TEST file or change an existing one I would expect the LOG.CNT item to be created and incremented. After doing so the CLIFF.LOG file is empty. The item never gets created. I have updated the file using ED and U. I have tried the program both with and without the ITEM parameter. I have tried logging off and logging back on with a different user name. What am I doing wrong? This is so basic it must be something so simple I am overlooking it. Cliff |
#4
| |||
| |||
|
|
Cliff wrote: I can't believe I can't get this CALLX test to work. I must be doing something stupid. Here are the basics: File CLIFF.TEST exists and contains a CALLX statement in attribute 8 of the data d-pointer. CT DICT CLIFF.TEST CLIFF.TEST CLIFF.TEST 001 D 002 $(MDS):$(MD)/CLIFF.TEST/CLIFF.TEST/CLIFF.TEST 003 3 004 005 006 007 008 CALLX CLIFF.UPDATE 009 010 The program CLIFF.UPDATE is FLASHED and CATALOGED in the account in which I am working. CT CLIFF.BP CLIFF.UPDATE CLIFF.UPDATE 001 SUBROUTINE CLIFF.UPDATE(ITEM) 002 * 003 OPEN 'CLIFF.LOG' TO F.LOG ELSE RETURN 004 READ LOG.ITEM FROM F.LOG,'LOG.CNT' ELSE LOG.CNT = 0 005 LOG.CNT = LOG.CNT + 1 006 WRITE LOG.ITEM ON F.LOG,'LOG.CNT' 007 * 008 RETURN 008 * 009 END I see a couple of things wrong here. On line 4 you read in LOG.ITEM ELSE LOG.CNT = 0. Then on line 6 you try to write LOG.ITEM, when it should be LOG.CNT, or else update LOG.ITEM instead of LOG.CNT If I add a new item item to the CLIFF.TEST file or change an existing one I would expect the LOG.CNT item to be created and incremented. After doing so the CLIFF.LOG file is empty. The item never gets created. I have updated the file using ED and U. I have tried the program both with and without the ITEM parameter. I have tried logging off and logging back on with a different user name. What am I doing wrong? This is so basic it must be something so simple I am overlooking it. Cliff |

#5
| |||
| |||
|
#6
| |||
| |||
|
|
No, it was clear. I see the bug. I fixed it but still not working. CLIFF.UPDATE 001 SUBROUTINE CLIFF.UPDATE(ITEM) 002 * 003 OPEN 'CLIFF.LOG' TO F.LOG ELSE RETURN 004 READ LOG.CNT FROM F.LOG,'LOG.CNT' ELSE LOG.CNT = 0 005 LOG.CNT = LOG.CNT + 1 006 WRITE LOG.CNT ON F.LOG,'LOG.CNT' 007 * 008 RETURN 009 * 010 END |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
I can't believe I can't get this CALLX test to work. I must be doing something stupid. Here are the basics: File CLIFF.TEST exists and contains a CALLX statement in attribute 8 of the data d-pointer. |
|
If I add a new item item to the CLIFF.TEST file or change an existing one I would expect the LOG.CNT item to be created and incremented. After doing so the CLIFF.LOG file is empty. The item never gets created. I have updated the file using ED and U. |
#9
| |||
| |||
|
|
I can't believe I can't get this CALLX test to work. I must be doing something stupid. CLIFF.TEST 001 D 002 $(MDS):$(MD)/CLIFF.TEST/CLIFF.TEST/CLIFF.TEST 003 3 004 005 006 007 008 CALLX CLIFF.UPDATE 009 010 |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |