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

opening a dataset after reading it from another data set


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arunsoods

New User


Joined: 13 Jul 2016
Posts: 35
Location: India

PostPosted: Wed Oct 04, 2017 3:54 pm
Reply with quote

Hi Team,

I required to read a data set from another data set for which I donot have any idea how can I achieve please let me know if it is possible or not.

Code:

G7D208MM G7UBB.ACCT.DD.FILE.IN(0)                                  08 
G7D207MM G7UBB.HIERCHY.DD.FILE.IN(0)                               08 
G7D403MM G7UBB.PRDP.LOANPERF.FILE.IN(0)                            08 
G7D200MM G7UBB.LB.MGT.FILE.IN(0)                                   16 


In above file I have jobName(G7208MM) FileName(G7UBB.ACCT.DD.FILE.IN(0)) and location(08) from where I want to pick the sequence number. The sequence number is of 4 byte & is at trailer of the file & at above mentioned byte location.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Oct 04, 2017 4:09 pm
Reply with quote

You need 2 jobs - the first to read your data set containg data set names, select the data set required and generate the second job to process that data set.

Or, with the programming language of your choice, do it in one step using dynamic allocation.
Back to top
View user's profile Send private message
arunsoods

New User


Joined: 13 Jul 2016
Posts: 35
Location: India

PostPosted: Thu Oct 05, 2017 1:10 pm
Reply with quote

Thanks Nic do we need to generate a job for each data set..?
Do you have any sample code that do the similar task..?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Oct 05, 2017 4:08 pm
Reply with quote

Quote:
do we need to generate a job for each data set

Without knowing your full requirements how would anyone know?

Quote:
Do you have any sample code that do the similar task..?

Plenty of examples around on this, and other forums.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Thu Oct 05, 2017 7:36 pm
Reply with quote

arunsoods wrote:
I required to read a data set from another data set for which I donot have any idea how can I achieve

Hum-m-m...
Does anyone have an idea about reading a dataset from another dataset??? icon_question.gif icon_cry.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Oct 05, 2017 8:39 pm
Reply with quote

Quote:
Do you have any sample code that do the similar task..?
This is a forum for experts -- as in people who can either use the Internet to find what they need or know how to write code without needing sample code. Asking for code on this forum, you should be prepared to pay professional rates for the code -- $500 to $2000 per day of coding are typical rates here. Perhaps you would be better off on Beginners and Students Forum instead of this forum? The code to use BPXWDYN for dynamic allocation has been posted multiple times and is pretty straightforward code. It is maybe 100 lines of COBOL (depending upon how complex you want to get), and less in other languages.

Furthermore, what will you do once you've found the sequence number? Use it in a program? Use it as a JCL parameter? Write it to another data set?
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top