Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is a DCL procedure?

DCL procedure
0
Posted

What is a DCL procedure?

0

Often the same series of DCL commands need to be issued many times, or some action needs to be automated. By placing a series of DCL commands in a file these goals can be attained. DCL supports control logic (IF, GOTO, CALL, etc.) so that quite complicated programs can be written in it, if need be. Examples DCL procedure (finds all organization:sequential files in a directory – not a terribly useful thing to do!): $!first line of DCL procedure: search_example.com $!P1 is a search string $ if(P1 .nes. “”) $ then $ string = P1 $ else $ string = “*.*” $ endif $top: $ file = f$search(string) $ if (file .eqs. “”)then exit $ org = f$file_attributes(file,”ORG”) $ if (org .eqs. “SEQ”)then write sys$output file $ goto top $!last line of DCL procedure $ @SEARCH_EXAMPLE Default, look at everything in local directory $ @SEARCH_EXAMPLE [.SUBDIR]*.TXT Look where indicated $ SUBMIT/LOG=SYS$LOGIN:/NOPRINT/AFTER=20:00 SEARCH_EXAMPLE Default, but do in batch, after 8:00 PM $ SUBMIT/LOG=SYS$LOGIN:/NOPRIN

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.