View previous topic :: View next topic
|
Author |
Message |
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
Hi -
I want to allocate one file using 'PUTENV' utility in cobol program but the requirement is to allocate the file with a retention period of 3 months. I have used the command as mentioned below.
01 WS-DYN-FILE.
05 FILLER PIC X(37) VALUE
'CPOUT=DSN(F6744DEV.ECAP.DYNAMIC.FILE)'.
05 FILLER PIC X(24) VALUE ' NEW TRACKS SPACE(90,90)'.
05 FILLER PIC X(13) VALUE ' UNIT(SYSDA) '.
05 FILLER PIC X(11) VALUE ' RETPD(90) '.
05 FILLER PIC X(07) VALUE 'CATALOG'.
but the program is getting compiled successfully but while running S0C4 is coming. The error message is "An invalid keyword RETPD was found in environment variable CPOUT while processing file DYN-FILE in program DYNPRG"
Could anybody please help me how could I allocate a file dynamically with a retention period? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You need to talk with your storage management people about the policies with regard to the retention and life cycle management of data. If your storage environment is correctly set up, then whatever you specify as a retention period or SMS class will be overridden by the policy values rather than the value specified by the whim of a programmer.
And anyway, why not use the JCL to attempt this rather than hiding it in a program.
So which is easiest to change, JCL or a COBOL program ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
oh, but it is soooooo coool to hide things in a program,
especially by someone with so little experience he can not solve his own problems. |
|
Back to top |
|
|
amrita.chatterjee
New User
Joined: 27 Apr 2006 Posts: 48 Location: Bangalore, India
|
|
|
|
I don't want to hide anything in cobol. I am allocating the file dynamically as the current timestamp is one of the parameter in the file file. hence I can't allocate the file in the jcl. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why oh why this need for a timestamp. Have you not considered the use of the good ol' GDG as an alternative. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
What part of "invalid keyword RETPD" do you not understand? You cannot specify RETPD in your dynamic allocation, period. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
, 'am away from Mainframes and ill...just a guess, Try using EXPDT instead of RETPD... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Oh Robert, then I believe EXPDT should not work also... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
current timestamp is one of the parameter in the file file |
I though the board language was english, not jibberish. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
@ amrita.chatterjee
>> I am allocating the file dynamically as the current timestamp is one of >> the parameter in the file
I think you mean: current TS is one part of the file-name.
You also could achive this by using variables of your sheduling system.
More easier than hiding it in a programm. |
|
Back to top |
|
|
|