Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Dynamically allocating file with retention period.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Wed Dec 30, 2009 11:44 am    Post subject: Dynamically allocating file with retention period.
Reply with quote

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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 30, 2009 1:13 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Wed Dec 30, 2009 1:29 pm    Post subject:
Reply with quote

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

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Wed Dec 30, 2009 2:01 pm    Post subject: Reply to: Dynamically allocating file with retention period.
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 30, 2009 3:37 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Wed Dec 30, 2009 4:44 pm    Post subject:
Reply with quote

What part of "invalid keyword RETPD" do you not understand? You cannot specify RETPD in your dynamic allocation, period.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Dec 30, 2009 5:00 pm    Post subject:
Reply with quote

icon_idea.gif, 'am away from Mainframes and ill...just a guess, Try using EXPDT instead of RETPD...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Dec 30, 2009 5:02 pm    Post subject:
Reply with quote

Oh Robert, then I believe EXPDT should not work also...icon_sad.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Wed Dec 30, 2009 5:24 pm    Post subject:
Reply with quote

Quote:
current timestamp is one of the parameter in the file file


I though the board language was english, not jibberish.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 755
Location: Germany

PostPosted: Thu Jan 07, 2010 4:01 pm    Post subject:
Reply with quote

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

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us