Joined: 27 Apr 2005 Posts: 43 Location: United States
Hi sergeyken,
I know the best way is to use a symbolic, but the 'AAAB1' (this will vary) will be in a file that the customer controls. How would I get that value from their input file into that &inparm value in the JCL?
I thought there may be a way to use ICETOOLS or FILE-Manager to read this input file and pull 'AAAB1' out and set the &inparm with that value.
Code:
EDIT CUST.INPUT.FILE.DATA - 01.01
Command ===>
****** ***************************** Top of Data *******
000001 BLAHBLAHBLAH AAAB1 XXXXXOTHER STUFF
****** **************************** Bottom of Data *****
I know the best way is to use a symbolic, but the 'AAAB1' (this will vary) will be in a file that the customer controls. How would I get that value from their input file into that &inparm value in the JCL?
I thought there may be a way to use ICETOOLS or FILE-Manager to read this input file and pull 'AAAB1' out and set the &inparm with that value.
Code:
EDIT CUST.INPUT.FILE.DATA - 01.01
Command ===>
****** ***************************** Top of Data *******
000001 BLAHBLAHBLAH AAAB1 XXXXXOTHER STUFF
****** **************************** Bottom of Data *****
In those cases I use two-steps approach:
0) create the required dataset with a typical unique name, like
1) use any text-processing tool (I prefer SORT utility, but many options are available) - to generate, in a temporary DSN=&&ALTER, the statements (for IDCAMS, or other tool) - to rename the initial DSN to the required one -
Code:
ALTER SYSTEM.$STD.DATA NEWNAME( SYSTEM.AAAB1.DATA )
2) run IDCAMS (or any other utility) using the dynamically generated statement(s) from #1 as the utility's input:
P.S.
All JCL SET-variables are resolved before job execution begins.
There is no way to change any SET-value while the job is running.
Same as macro-variables in some languages.
In C++ you cannot change MAX_VALUE which was defined as:
Depending on your input parameters data, the operation can be hidden into a JCL PROC:
// EXEC RENAME,HLQ=SYSTEM,LLQ=DATA
//SORTIN DD DSN=SYSTEM.INPUT.PARAMS : 'xxxxx $STD xxxxx AAAB1 xxxxx'
//*