Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tstprg: proc options(main);
- dcl inFile file record input;
- dcl eof_infile bit(1) init('0'b);
- on endfile(inFile) eof_infile = '1'b;
- dcl inTable(10) char(32);
- dcl inTableSize bin fixed(31,0) init(0);
- dcl targTable(5) char(32);
- call mainprog;
- mainprog: proc reorder;
- open file(inFile);
- inTableSize += 1;
- read file(inFile) into(inTable(inTableSize));
- do until(eof_infile);
- inTableSize += 1;
- read file(inFile) into(inTable(inTableSize));
- end;
- close file(inFile);
- inTableSize -= 1;
- call proc1;
- end mainprog;
- proc1: proc reorder;
- call proc2;
- end proc1;
- proc2: proc reorder;
- dcl i bin fixed(31,0);
- do i = 1 to inTableSize;
- someTable(i) = inTable(i);
- end;
- end proc2;
- end tstprg;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement