UDO1 BL UENDDO1 While( Not ) {
*
MVI URLINE,C' ' Clear
MVC URLINE+1(70),URLINE Record print line
*
XDECI 7,0(,4) Read item number
XDECO 7,URITEMN Store to rline
*
* < > Search for item number
*
LR 8,2
UDO2 C 8,0(,3) While( CurPtr != EndPtr )
BE UENDO2 {
*
C 7,0(8) if( key == record)
BNE UENDIF1 {
MVC URITMNM(20),12(8) Put found item in rline
B UENDO2 Break
UENDIF1 DS 0C }
LA 8,RECLEN(,8) Increment record ptr
B UDO2 Loop to top
UENDO2 DS 0C }
*
C 8,0(,3) if( CurPtr == EndPtr )
BNE UENDIF2 { //item not found
MVC URITMNM(34),UBAD Copy error message
LA 6,1(,6) Update Error counter
B UENDELSE }
UENDIF2 DS 0C else {
XDECI 7,7(,4) Get transaction count
CLI 6(4),C'-' if( trans == sold )
BNE UENDIF4 {
XDECO 7,URSOLD write num sold
B UENDELS2 }
UENDIF4 DS 0C else {
XDECO 7,URREC write num recieved
UENDELS2 DS 0C }
UENDELSE DS 0C }
*
*
C 5,=F'20' if( count == 20 )
BNE UENDIF3 {
LA 5,0 count = 0
XPRNT UCHEAD,UECHEAD-UCHEAD Print company
XPRNT UR1HEAD,UER1HEAD-UR1HEAD and report header
UENDIF3 DS 0C }
*
XPRNT URLINE,UERLINE-URLINE Print record
*
LA 5,1(,5) Update Counter
XREAD 0(,4),80 Read next line
B UDO1 Loop to top
UENDDO1 DS 0C } |