Subject: | |
From: | |
Reply To: | |
Date: | Fri, 22 Dec 2000 12:32:28 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Here is a solution we use for getting dynamic info into a job stream file.
It does not require MPEX, it uses QEDIT, but could used EDITOR instead
1 cls
2 COMMENT ******************************************************
3 COMMENT * NOTE: DO NOT MODIFY THIS FILE !!!!!!!!!!!!! *
4 COMMENT * This job is setup to prompt for: *
5 COMMENT * - period of the claim purge (1 quarter) *
6 COMMENT * Job CLMPURGE will be streamed by this command file *
7 COMMENT ******************************************************
8 echo command file: CLMPURGE.SMARTJOB.MSL3000
9 echo
10 input qtrdate, "Beginning/Ending period, (ex. Oct-Dec 2000):"
11 echo
12 echo The parameter entered is:
13 echo Beginning/Ending period of Claim Purge - !qtrdate
14 echo
15 input promptyn, "Is this correct (Y/N):"
16 setvar promptyn ups("!promptyn")
17 if promptyn = "Y"
18 echo
19 else
20 echo Run Terminated by request
21 return
22 endif
23 purge printo,temp >$null
24 purge tmpjob,temp >$null
25 build printo;temp;rec=-80,,f,ascii;disc=1000
26 file printo,oldtemp
27 file tmpjob;temp;rec=-80,,f,ascii;disc=1000
28 print clmpurge.smartjob.msl3000;start=35;out=*printo
29 run qedit.pub.robelle;parm=4;&
30 info='set interactive off;t *printo;&
31 cq"{q}"!qtrdate"[/];&
32 k tmpjob;e' >$null
33 stream tmpjob
34 return
35 !job CLMPURGE,manager.msl3000;outclass=lp,1
36 !setvar QTRDATE '{q}'
37 .......
38 !EOJ
- execute the command file from a session
- line 10 prompts for a parameter value
- lines 11-22 display value and verify that the value entered is OK
- line 28 'prints' the command file starting at line 35 to a temp file
- the qedit execution on 29-32 scans the file looking for {q} and
replaces it with the parameter value
- line 33 streams the temp file
the variable QTRDATE now has the parameter value enter by the user
there are ways to perform this, but this works for us.
regards,
Robert
|
|
|