View previous topic :: View next topic
|
Author |
Message |
ksreddy
New User
Joined: 30 Mar 2005 Posts: 12 Location: Hyderabad
|
|
|
|
Hi,
my sort program looks like this,
//act001 exec pgm=sort
//sortin dd dsn=abc.xyz.pqr.aug05,disp=shr
//sortout dd dsn=...............,disp=shr
//......
//.....
so,every month suffix of sortin dd name should be changed.
i.e., next month my sortin dd name should be
//sortin dd dsn=abc.xyz.pqr.sep05
how can i get this
regards,
santhosh |
|
Back to top |
|
|
varun_sharma
New User
Joined: 08 Jun 2005 Posts: 19 Location: new delhi
|
|
|
|
Hi
U can write define ur files in a proc and use symbolic parameters there, else u can also use overriding parameters. Bt u need to pass values every month, it can't just change the name of the file by itself.
Plz let me know if there's some other way out.
Varun Sharma |
|
Back to top |
|
|
shinjini_t
New User
Joined: 11 May 2005 Posts: 14 Location: Bangalore, India
|
|
|
|
to avoid such manual efforts we use generation datasets! Try using them then no one needs to manually update the name of the dataset in the JCL.
Shinjini |
|
Back to top |
|
|
ksreddy
New User
Joined: 30 Mar 2005 Posts: 12 Location: Hyderabad
|
|
|
|
Hi Shinjini,
we can use gdg but with gdg we can create gdg's of same name and we can change generations but here case is different.
i want suffix should be changed every month.
now we are using procs there we change suffix every month
how can we get this with out manual effort
regards,
santhosh |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
As varun_sharma mentioned, you're going to have to create and use symbolic parameters. My thought - keep the value you want in a library and use a combination of JCLLIB, SET, and INCLUDE statements:
The library:
Code: |
'MY.PDS(SUFFIX)' contains the one record:
// SET SUFF=SEP05
|
The job:
Code: |
//MYJOB JOB (....),CLASS=X
//*
// JCLLIB ORDER=MY.PDS
// INCLUDE MEMBER=SUFFIX
//*
//ACT001 EXEC PGM=SORT
//SORTIN DD DSN=ABC.XYZ.PQR.&SUFF,DISP=SHR
//SORTOUT DD DSN=...............,DISP=SHR
|
|
|
Back to top |
|
|
ksreddy
New User
Joined: 30 Mar 2005 Posts: 12 Location: Hyderabad
|
|
|
|
Hi superk,
thankyou for u'r reply but every month we need to update member SUFFIX of MY.PDS. but in production we are not supposed to change pds members. so please suggest another option
regards,
santhosh |
|
Back to top |
|
|
Hari Kumar
New User
Joined: 28 Jul 2005 Posts: 19
|
|
|
|
Hi Santhosh,
First Execute Cobol Program For Updating SUFF & Next step use SUFF[UPDATED VALUE]
COBOL PROGRAM STEPS
------------------------------
Code: |
1) ACCEPT CURRENT DATE & MONTH [SYSTEM DATE]
a) Split date & Month
2) CHANGE SYSTEM DATE & SYSTEM MONTH TO USER FORMAT
EX
IF MONTH = 04 THEN MOVE 'APR' TO MONTH1
3) Write updated value to PS or PDS Member. |
Let Me know If u need full coding for this |
|
Back to top |
|
|
ksreddy
New User
Joined: 30 Mar 2005 Posts: 12 Location: Hyderabad
|
|
|
|
Hi Hari Kumar,
i didn't get you. please give full coding
thankyou for you'r reply
regards,
santhosh |
|
Back to top |
|
|
Prandip
New User
Joined: 04 Mar 2005 Posts: 84 Location: In my tiny cubicle ...
|
|
|
|
ksreddy, the frustrating part of a post such as this is that you have not indicated what might be acceptable, what options you have already tried and rejected, and how you might want this to work in a production environment.
Why can't your job scheduling system (CA-7, CA-Scheduler, CA-JobTrac, Control-M, TWS/OPC) provide this information in the form of a symbolic variable to the job? That is one of their primary purposes.
If you have already ruled out that option, and the option Superk provided, then you are restricting your options to two methods.
One, dynamically allocate the SORTIN dataset and run SORT using the dynamically allocation:
Code: |
//STEP0001 EXEC PGM=ICEGENER
//SYSUT1 DD DATA,DLM=@@
/* REXX */
CURR_MMM = LEFT(DATE(M),3)
CURR_YY = LEFT(DATE(J),2)
"ALLOC DD(SORTIN) DA('ABC.XYZ.PQR."CURR_MMM||CURR_YY"') SHR"
IF RC <> 0 THEN EXIT 4
"CALL *(SORT)"
EXIT 0
@@
//SYSUT2 DD DSN=&&PDS(GETDATE),DISP=(,PASS),UNIT=VIO,
// SPACE=(TRK,(1,1,1),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//STEP0002 EXEC PGM=IKJEFT01,PARM='%GETDATE'
//SYSPROC DD DSN=&&PDS,DISP=(OLD,PASS)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//SORTOUT DD DSN=SORTOUT.DATASET,...
//SYSOUT DD SYSOUT=*
//SYSIN DD *
...
/*
|
two, build and submit the entire job (or portions of the job) programatically. |
|
Back to top |
|
|
|