Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to retrieve data from file into JCL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Wed Mar 17, 2010 12:02 am    Post subject: How to retrieve data from file into JCL?
Reply with quote

Hi,

I have a file where I just have one record (With say Date of 8 bytes). I need this value as a JCL variable (say &DATE).

Is there any means where the value in the file can be sent to the JCL as variable?

Thanks,
Raghav
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1777
Location: Bloomington, IL

PostPosted: Wed Mar 17, 2010 12:07 am    Post subject:
Reply with quote

Read this fine thread.
Back to top
View user's profile Send private message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Wed Mar 17, 2010 12:19 am    Post subject: Reply to: How to retrieve data from file into JCL?
Reply with quote

Hello!!

My requirement is that I have a file X which has 1 record in it.

********************* Top of Data ****************************
20100316
********************* Bottom of Data **************************

This file will be updated with the date everyday. I need this date value to be passed to the JCL Variable (&DATE).

Thanks,
Raghav
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 Mar 17, 2010 12:27 am    Post subject:
Reply with quote

Hello,

Did you read the topic in the link provided?

If not, do so now. It yes, post what you found that caused you to re-post the same question. . . icon_confused.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Mar 17, 2010 12:34 am    Post subject:
Reply with quote

Quote:
Is there any means where the value in the file can be sent to the JCL as variable?
Maybe -- or maybe not, depending upon exactly what you are wanting to do. Without more details, and your reading the previously posted link would be a good start, that's all the answer we can give you.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Mar 17, 2010 2:06 am    Post subject:
Reply with quote

What will your JCL do with this variable once it is "retrieved" from your file? Maybe the answer to that will point the way to a solution.
Back to top
View user's profile Send private message
santosh100678

New User


Joined: 21 Sep 2009
Posts: 55
Location: Kolkatta

PostPosted: Fri Mar 26, 2010 5:00 pm    Post subject:
Reply with quote

Hi,

Please tell me where you have to passed if you want to pass this date in query or file could you please give me the example
//J010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INFIL DD DSN=input date fiel ,DISP=SHR
//OUTFIL DD DSN=outputdate file,DISP=(,PASS,DELETE),
// UNIT=WORK,SPACE=(TRK,(5,5),RLSE),
// DCB=(LRECL=1020,RECFM=VB,BLKSIZE=2036)

//SYSIN DD *
REPRO INFILE(INFIL) OUTFILE(OUTFIL) -
FROMKEY('key value') COUNT(1)

//S010 EXEC PGM=SORT,COND=(0,NE)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=workfilestepj010 input file,DISP=SHR
//SORTOUT DD DSN=create file final ,DISP=(,CATLG,DELETE),
// UNIT=WORK,SPACE=(TRK,(3000,750),RLSE),

//sysin dd *
SORT FIELDS=COPY

INCLUDE COND=(5,9,CH,EQ,C'key value',AND,29,2,CH,EQ,C'IA')

OUTREC FIELDS=(1:C'AND S.LAST_UPD_TS >= TIMESTAMP(',C'''',

C'20',47,2,C'-',41,2,C'-',44,2,C'-00.00.00'') - 12 HOURS',C';',

15X),VTOF


please post you clear requirement
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us