I need help to understand the Pseudo code written in the control card of DSUTILTY. I found the similar type of code in WAAPDSUT as well. The step executing this is : -
CLC COUNT1,=X'00000001'
BE SYSUT2(RX) GET DATE REC
CLC 12(8,RX),=C'99999999' GET CONTROL REC
BE SYSUT2(RX)
CLC 10(10,RX),0(RY) MATCH TO INPUT SELECT CARD(S)
BE 1
BH 2 GO CHECK IF ANY HITS ON THIS SEL
BL DELETE(RX) GET NEXT STAT RECORD
1 BAL SYSUT2(RX) WRITE STAT FILE MATCH SELECT CARD
MVI 20(RY),C'X' INDICATE A STAT REC WAS FOUND
B DELETE(RX) DELETE GO PROCESS NEXT STAT
2 CLI 20(RY),C'X' THIS WILL INDICATE A SELECT MADE
BE DELETE(RY) Y- DELETE AND GO TO THE NEXT I/P
MVC 20(41,RY),=C'**E R R O R** NO HIT ON STAT FILE THIS NO'
B SYSUT3(RY)
EOFX MVC 0(1,RZ),=X'FF'
80 CLC 1(1,RZ),=X'FF'
BE EOF
CLI 20(RY),C'X' STAT RECORD FOUND
BNE 81 NO - GO BUILD ERROR MESSAGE
BAL DELETE(RY) DROP
B 80
81 MVC 20(41,RY),=C'**E R R O R** NO HIT ON STAT FILE THIS NO'
BAL SYSUT3(RY)
BAL DELETE(RY)
B 80
EOFY MVC 1(1,RZ),=X'FF'
90 CLC 0(1,RZ),=X'FF'
BE EOF
CLC 12(8,RX),=C'99999999' GET CONTROL REC
BE SYSUT2(RX)
BAL DELETE(RX)
B 90
END
After a test run I found what was done but I need to know exactly how control is flowing through the Pseudo code.
The test result shows following logic:-
input.file has n number of records and input.select has records 10bytes each. The input.select records are those which need to be extracted from the input.file.
The DSUTILTY use the control card to search input.file record by record and if first 10bytes of any record matches with the input.select it writes that record to output.file, and if not found a message get written to output.err file that specific record not found. Except that, two more records got written to output.file; one is date record(at the top of the input.file) and the other one is control record (with 99999... the last record of input.file)
I will be thankful if someone can help me to try run the pseudo code reaching the test result. I need to transform this code to any other to achieve the same thing.
do not hold too many hopes,
the question is too much site specific to expect an answer,
the consequences of using undocumented tools and interfaces should have been clear
to Your organization from the beginning
the best thing to do is to look at the application flow to understand what is going on
and rewrite the logic using sort ( dfsort or syncsort ) tools, very good at file matching
or a cobol program
Quote:
Awaiting help.
be careful not to get a S522 abend ( wait time limit exceeded )