Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to update suffix of ps every month

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
ksreddy

New User


Joined: 30 Mar 2005
Posts: 12
Location: Hyderabad

PostPosted: Tue Aug 02, 2005 10:14 am    Post subject: how to update suffix of ps every month
Reply with quote

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
View user's profile Send private message

varun_sharma

New User


Joined: 08 Jun 2005
Posts: 19
Location: new delhi

PostPosted: Tue Aug 02, 2005 10:19 am    Post subject: Re: how to update suffix of ps every month
Reply with quote

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
View user's profile Send private message
shinjini_t

New User


Joined: 11 May 2005
Posts: 14
Location: Bangalore, India

PostPosted: Tue Aug 02, 2005 10:56 am    Post subject: Re: how to update suffix of ps every month
Reply with quote

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
View user's profile Send private message
ksreddy

New User


Joined: 30 Mar 2005
Posts: 12
Location: Hyderabad

PostPosted: Tue Aug 02, 2005 11:18 am    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Aug 02, 2005 3:50 pm    Post subject: Re: how to update suffix of ps every month
Reply with quote

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
View user's profile Send private message
ksreddy

New User


Joined: 30 Mar 2005
Posts: 12
Location: Hyderabad

PostPosted: Tue Aug 02, 2005 6:56 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Hari Kumar

New User


Joined: 28 Jul 2005
Posts: 19

PostPosted: Tue Aug 02, 2005 8:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ksreddy

New User


Joined: 30 Mar 2005
Posts: 12
Location: Hyderabad

PostPosted: Tue Aug 02, 2005 8:41 pm    Post subject:
Reply with quote

Hi Hari Kumar,

i didn't get you. please give full coding


thankyou for you'r reply


regards,
santhosh
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 85
Location: In my tiny cubicle ...

PostPosted: Tue Aug 02, 2005 10:53 pm    Post subject: Re: how to update suffix of ps every month
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us