IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

access a file's data in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shankarm

Active User


Joined: 17 May 2010
Posts: 175
Location: India

PostPosted: Thu Dec 15, 2011 8:13 pm
Reply with quote

All,

I am allocating a file dynamically using assembler and the file is named dynamically with time stamp and FTP'ed to a server.

Say, i have three steps,
step1
step2
step3

step1: Calls Assembler program - allocates two files internally
File1 - has application specific data
File2 - has the dynamically created FTP card with File1's name in it.

Note: File1's name will change in every run and the FTP card will be created in this step with file1's name in it.

step2: FTP's the file (file1) to a server using the FTP card (file2) created in step1.

Step3: I am trying to access file1 in JCL as a DD statement. How do i access this? Note: the file name i want is available inside file2 but i want to access this in JCL. is there any way to do this?

Note: I dont want to copy the file content into another file and use it in the jcl, i want to use the same file name. Please help.

Please help.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Dec 15, 2011 8:29 pm
Reply with quote

make step 3 a separate job,
submitted after step 2, via intrudr
the jcl being modified (dd dsn) by step1.

you can not change jcl after it has been processed by jes and the job is started by the initiater.
actually, you can not change the jcl once it has been submitted to jes.

and don't tell me a site that allows the idiocy of dynamic filenames not documented via dd statements
does not allow submission of a job by a preceding job.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Dec 15, 2011 9:00 pm
Reply with quote

I don't understand. Why does the source dataset name have to change? Why can't it be static, and just let the target filename change?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Dec 15, 2011 9:36 pm
Reply with quote

Kevin, are you actually questioning THE REQUIREMENT? icon_biggrin.gif
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Dec 16, 2011 2:32 am
Reply with quote

Robert Sample wrote:
Kevin, are you actually questioning THE REQUIREMENT? icon_biggrin.gif


Actually, I'm fine with the requirement. It's the proposed solution I'm questioning. This isn't really that difficult a process to figure out.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Dec 16, 2011 4:01 am
Reply with quote

Quote:
It's the proposed solution I'm questioning. This isn't really that difficult a process to figure out.
Yup !

Maybe there are bonus points for overly complicating the implementation. . . icon_confused.gif

Or i've gotten lost again. . . icon_cool.gif

d
Back to top
View user's profile Send private message
shankarm

Active User


Joined: 17 May 2010
Posts: 175
Location: India

PostPosted: Fri Dec 16, 2011 10:28 am
Reply with quote

The requirement is given by the client themselves, They want us to dynamically create the source and destination file name.


Our standerda say, we cannot submit jobs internally
Quote:

make step 3 a separate job,
submitted after step 2, via intrudr
the jcl being modified (dd dsn) by step1.


I can make step 3 a seperate job but how will i access the file name in JCL(step3 - which is a seperate job)?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Dec 16, 2011 11:59 am
Reply with quote

Hello,

Create the jcl (or the filename) for step3 before step3 is entered into the system. I believe with a bit of research with your scheduling people, you may be able to do this with relative ease.

Another possibility is that the "step3 info" be created early in the run and referenced in "step3".

Most of the systems i work with "send" files and do not dynamically allocate the files via assembler. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top