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
 

 

Editing Physical File name in COBOL MOdule

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

New User


Joined: 20 Apr 2006
Posts: 9

PostPosted: Wed Apr 14, 2010 8:07 am    Post subject: Editing Physical File name in COBOL MOdule
Reply with quote

I was able to read DSN name of a dataset in COBOL module using TIOT parameters.

Would it be possible to EDIT this name of this dataset after the read.
Ex: After reading the dataset name as VGUNDU0.EPIC.TS
I tried moving/changing the name to VGUNDU0.E123.TS1.

The reason am doing this is because, the name can change and have a number which is dynamic and varies with each run.

This gave me a S0C4 abend which looked understandable.

Is there any way in which this can be done. I tried searching for past posts but couldn't find any relevant to this.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 14, 2010 8:57 am    Post subject:
Reply with quote

Hello,

If your code works correctly the current dsn will be available - there is no reason to change it. The code would locate the proper dd and return the first dataset name used by that dd (concatenated datasets are an entirely different matter).

Even if you believe there is a reason to change the actual dataset name, you cannot. . .

Why do you believe you should change something that is managed by the operating system, not your code?

Possibly there is something i misunderstand. . .
Back to top
View user's profile Send private message
santosh.iim

New User


Joined: 20 Apr 2006
Posts: 9

PostPosted: Wed Apr 14, 2010 9:18 am    Post subject:
Reply with quote

Thank you for replying.

The reason i am planning to change the name of the file is that we usually give a file in the JCL in this fashion. (VGUNDU0.QYQ9999.XS3). The number 9999 is generic one in the JCL.

As of today, there is a Asembler module which reads this DSN, changes the 9999 to a number which is dynamic and then located in the same Assembler.

Our intention was to replace this Assembler code with COBOL and in the process we are trying to change the name of the file.

Sorry for causing confusion. Please let me know if this is clear enough to understand.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 14, 2010 9:54 am    Post subject:
Reply with quote

Hello,

What you want is to name the file dynamically (if i understand). You can do this without trying to modify the system control block in your code.

Look here for starters:
http://ibmmainframes.com/viewtopic.php?t=46689

If you search the forum for BPXWDYN and PUTENV you will find multiple topics. . .
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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