Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to a dataset

Status
Not open for further replies.

huntnut

Technical User
Dec 17, 2002
2
US
Hello all,

1st. time poster to this forum and I have a question about writing to a TSO dataset. I'm using Compuware's Hiperstation product and it's based on REXX. Currently I have a script that reads and loops through user defined dataset (test cases) by using sub-routines write off some of the test case info into a secondary dataset to create a log file of if the testcase was successfull or not. The script is in working order and I have omited a ton of stuff, so if more info is need, please ask me. This is have I have so far and I can't further.

And I thnk you in advance for your help.

CALL VLOGON
CALL HARD_CODED_VARS
ADDRESS HSCMDS"ALLOC F(INPUT) DA(USER.DATA) SHR REUS"
/*ADDRESS HSCMDS"ALLOC FI(DATAOUT) DA(TEST.DATA) MOD REUS" */
"EXECIO * DISKR INPUT (STEM INPUT_REC. FINIS"
DO X = 1 TO INPUT_REC.0
CALL VARIABLE_ROUTINE
CALL LOGIC
CALL MENU
CALL SCREEN_1_THRU_9
CALL SCREEN_10_THRU_19
CALL SAVE_TESTCASE
CALL LOGRPT
END
CALL END_OF_SCRIPT
EXIT

LOGRPT:
INPUT.X = POL_NUM LINE_01
"EXECIO" INPUT.0 "DISKW DATAOUT (STEM OUT_REC."
DO
DROP INPUT.
END
"EXECIO 0 DISKW DATAOUT (FINIS"
/* "FREE F(INPUT)" */
/* "FREE F(DATAOUT)" */
RETURN

 
...and you're having trouble writing?

(a) Allocations are usually done in 'address TSO'; you may not have successfully allocated.

(b) I would move the 'call logrpt' outside the loop so that you exercise EXECIO once rather than once-per-line. As written you are writing -n- rows from OUT_REC. on each iteration (-n- = # of lines read from INPUT). There is no indication of what's in OUT_REC. (if anything).

You should probably run this in Trace(?R) so you can see what's actually happening
 
Try adding in a line like...say 'result of <action> :'rc

To check things are actually working
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top