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: 1784
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: 8211
Location: Dubuque, Iowa, 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 Data security erase on RAID device steve-myers All Other Mainframe Topics 0 Sat Jan 13, 2018 6:41 am
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Append the milliseconds to the data s... girishb2 DFSORT/ICETOOL 1 Thu Dec 21, 2017 9:07 pm
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm

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