symbolic parameter.

JES2/3, JCL, utilities.
Post Reply
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

symbolic parameter.

Post by DEVAPRIYA »

hi,

i have a data in particular pds member below.
pds: DEVA.ACCESS(DATE)
date('1408')

in another PDS member (accept) i am using the above dataset.

Code: Select all

//xxxx exec accept
//accept proc
//XXXX EXEC IEBGENER
//SYSUT1 DD DSN=DEVA.ACCESS(DATE),DISP=SHR
//SYSUT2 DD DSN=&&TEMP,DISP=(NEW,PASS)
//SYSIN DD DUMMY
//
i want to update the current date value in DEVA.ACCESS(DATE) daily ..is there any method that automatically take the current o date directly while submitting the job with out manual change..

or is it possible to change date in (accept) proc jcl using symbolic value with out accessing access dataset.

please help me.
Last edited by Anuj Dhawan on Sun Sep 07, 2014 10:46 pm, edited 1 time in total.
Reason: Added Code tags. removed 'urgent'.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: symbolic parameter.

Post by Anuj Dhawan »

Hi Devapriya,

The date you need is in YYMMform? You don't need the day?

And what SORT product are you using at your shop?
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

Hi Anuj,

I need only YYMM alone..i don't want date..

And what SORT product are you using at your shop?
i can't get you wat u r asking for...
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: symbolic parameter.

Post by Robert Sample »

And what SORT product are you using at your shop?
i can't get you wat u r asking for...
The question is a simple one -- are you using DFSORT, or SYNCSORT, or CA-SORT, or some other sort product? And the reason for asking is that what you are wanting to do is usually done through the sort product, and the particulars will vary depending upon which sort product your site has installed.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: symbolic parameter.

Post by Anuj Dhawan »

Hello Devpriya,

Assuming:
  • you want date in position 1 in a RECFM=FB and LRECL=80 byte and
  • the SORT product at your shop supports the DATE2 function , use the following SORT JCL:

Code: Select all

//STEP01 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
dummy
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  INREC IFOUTLEN=80,
        IFTHEN=(WHEN=INIT,OVERLAY=(81:DATE2,1:83,4))
//*
Change SORTOUT as per your need.

As Robert has said, I've assumed that you can use the SORT to achieve what you need. However, I think (though I've not tested it) - that you can make use of symbol converter EZACFSM1 as well.

OTOH, to know what SORT product is in use at your shop - look for message's prefix in the SYSOUT of any recently executed SORT job -- if you see WERxxxx - it's SyncSort, if it's ICExxx - it's DFSORT; if there is something else you need to tell us what is that.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

is it possible to use these symbolic parameter &LMON AND &LYR2 in to the dataset value

pds: DEVA.ACCESS(DATE)
date('1408')
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: symbolic parameter.

Post by Anuj Dhawan »

DEVAPRIYA wrote:is it possible to use these symbolic parameter &LMON AND &LYR2 in to the dataset value

pds: DEVA.ACCESS(DATE)
date('1408')
I'm somewhat confused with your statement - is it in continuation with your original question? As first statement in your this post relates to EZACFSM1 but why do you again write the PDS name?

To answer your first statement - "&LMON" AND "&LYR2" can be used as dataset nodes (I think by "dataset value" you actually mean nodes) for a job executing EZACFSM1. This lists the supported Dynamic System Symbols.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

what will be the result if i give date("&LMON&YR2")..

if it wont work so..can you please provide me the syntax using EZACFSM1 for this process.
moreover i dont have any testing id..Please do the needful....
Thanks in advance..
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

Anuj,

can you please provide me the jcl using EZACFSM1 to my request..
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: symbolic parameter.

Post by Anuj Dhawan »

If I got the correct inference of what you want, try this (untested):

Code: Select all

//DATEJCL JOB ,'DATEJCL',CLASS=F,MSGCLASS=1,    
//         NOTIFY=&SYSUID,
//STEP00   EXEC PGM=EZACFSM1                  
//SYSIN    DD DATA,DLM=@@                      
//RUNJ JOB ,'##JCL',CLASS=F,MSGCLASS=1, 
//         NOTIFY=&SYSUID,REGION=4096K        
//STEP01   EXEC PGM=IEFBR14                    
//SYSUT2   DD  DSN=XXXX.XXX.D&LYR2&LMON,        
//             DISP=(NEW,CATLG,DELETE),        
//             UNIT=SYSDA,RECFM=FB,LRECL=80, 
//             SPACE=(CYL,(1,1),RLSE)          
@@                                            
//SYSOUT   DD SYSOUT=(*,INTRDR),LRECL=80,BLKSIZE=80,BUFNO=1,RECFM=F  
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

Thanks Anuj,
this pgm is to create a dataset as deva.access.d1408
Let me clear up my que..
I have a fixed pds dataset with member: DEVA.ACCESS(DATE) inside i have a statement/record as:

000001 date('YYMM')
000002 END

i need to update the value of YYMM with current year/month automatically...when i am submitting the above IEBGENER program.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: symbolic parameter.

Post by nicc »

Then you will need a program to red the dt, update it and write to anothe dataset.

If your data is instream i.e. after a DD * AND you are using the ltest z/OS then you can use symbolics in your data.
Regards
Nic
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

Hi Guys.

i tried using sort program below

//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=DEVA.ACCESS(DATE),DISP=SHR
//SORTOUT DD DSN=DEVA.ACCESS(M1),DISP=SHR
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=INIT,OVERLAY=(81:DATE2,1:83,4))
//*
//

i got an output as the date when the member of M2 is created and i am not getting the current date.
input:
DATE('YYMM')
END
i got an output as
DATE('YYMM')
END YYMM --yymm as date when dataset M2 is created.

Please have a look and advice on it..
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

Hi anuj ,
can you please help me when i run the below program i got the current date in my output as
PARMS('1409')
END 1409

BUT I NEED OUTPUT AS
PARMS('1409')
END

I TRIED INREC OVERLAY=(10:DATE2) BUT I AM GETTING VALUE AS PARMS('201409
PLEASE HELP ME TO GET MY EXECAT OUTPUT

//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=DEVA.ACCESS(DATE),DISP=SHR
//SORTOUT DD DSN=DEVA.ACCESS(M1),DISP=SHR
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=INIT,OVERLAY=(81:DATE2,1:83,4))
//*
//
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: symbolic parameter.

Post by Anuj Dhawan »

Hello Devpriya,

I see that you've made two posts but deleted them later - did you get it working for you?
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
DEVAPRIYA
Registered Member
Posts: 22
Joined: Fri Jul 18, 2014 5:30 pm

Re: symbolic parameter.

Post by DEVAPRIYA »

Hi Anuj,

Ya i used DFSORT with DATE2 parameter as robert said it worked fine.

Thanks for help guys.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: symbolic parameter.

Post by Anuj Dhawan »

Great that you've got it working for you. :)

If possible, please post the final solution you've used - it might help someone in future.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Piggy Chop
Registered Member
Posts: 12
Joined: Sat Feb 08, 2014 1:58 pm

Re: symbolic parameter.

Post by Piggy Chop »

If possible can you please share your solution?
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”