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
 
Need help how to pass the ESP variables in SYSIN CARD FILE

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Venkichaitu

New User


Joined: 23 Aug 2014
Posts: 6
Location: india

PostPosted: Thu Nov 02, 2017 3:53 am    Post subject: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

Hi Guys,

I have one sort card it will build the records from the input file and one filed is which is coming from the ESP scheduler which is previous work date as variable !PREVDT , i need to use this variable to get the previous date . As SYSIN card is not accepting the PREVDT esp varaibles so I am used the in the JCL which is expanding and then using that variable to SYSIN in symbolic parameter . It not accepting the symbolic parameter in sysin card . Can you please help me how to resolve this issue .

in JCL we are giving as
Code:
 ISREDDE3   RPT.PLUS.JCLLIB(RDC4#21N) - 01.42           
 Command ===>                                           
 000017 //*                                             
 000018 //  SET  REGN='!REGN',                         
 000019 //       REL='!REL',                           
 000020 //       FS='!FSET',                           
 000021 //     PREVDTE='!PREVDT',                     
 000022 //       MSTR=''                               
 000023 //*       RCCON='!RCCON',                       
 000024 //*      FTPSVR='!FTPSVR'                       

substituted from ESP
Code:
//  SET  REGN='T',           
//       REL='',             
//       FS='1',             
//       PREVDTE='20171030', 
//       MSTR=''     



In sysin card file has the below

Code:
  SORT FIELDS=(45,6,CH,A,                       
               51,9,CH,A,                       
               68,3,CH,A)                       
  SUM FIELDS=NONE                               
  OMIT COND=((150,15,CH,EQ,C'000000000.0000'),OR
            (51,8,CH,EQ,C'99999999'))           
  OUTREC FIELDS=(01:5,2,            * RECORD ID:
                 03:2C'0',                     
                 05:45,6,          * PLAN, LEFT
                 11:6X,                         
                 17:1X,                         
                 18:51,9,          * PARTICIPANT
                 27:6X,            * SPACES     
                 33:2X,            * SPACES     
                 35:1X,                         
                36:&PREVDTE,     ---- this is giving issue while running the job
                      * 

Is there any way to substitute the value from the above previous date PREVDTE in sysin card file ..

Coded for you - do it yourself next time or risk your topic being locked
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Thu Nov 02, 2017 4:48 am    Post subject: Reply to: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

The first answer is that what you want to do requires z/OS 2.1. If you are running a release of z/OS before 2.1, what you want to do cannot be done, period.

If you ARE running z/OS 2.1, using symbols in an in-stream data set requires you to use EXPORT and SET in your JCL and adding the SYMBOLS= keyword to your DD statement.

Also note that your site support group can enable symbol support in in-stream data sets on a job class basis, so you MUST contact your site support group to verify that they have installed the support and which job classes are allowed to use in-stream symbols. If you attempt to use an in-stream symbol and the job class your job runs under does not support it, you will get an error message. This is why you MUST contact your site support group -- we do not work for your site and hence cannot tell you whether or not you can use symbols with in-stream data and if so which classes are supported.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10350
Location: italy

PostPosted: Thu Nov 02, 2017 5:02 am    Post subject: Reply to: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

my guess is that the sysicard file or whatever - is not inline to the submitted jcl - but it is a dataset

had it been inline the ESP token substitution could havedone it by using !PREVDT
Back to top
View user's profile Send private message
Venkichaitu

New User


Joined: 23 Aug 2014
Posts: 6
Location: india

PostPosted: Thu Nov 02, 2017 5:02 am    Post subject:
Reply with quote

Thanks for your information.. you are correct i am using the z/OS 2.1 version.Can you please give the how to use this export and SET combination in my case ..
Back to top
View user's profile Send private message
Venkichaitu

New User


Joined: 23 Aug 2014
Posts: 6
Location: india

PostPosted: Thu Nov 02, 2017 5:09 am    Post subject:
Reply with quote

Hi Enrico,

I have used the !PREVDT in JCL and it is substituted but when i used same in the Sysin card file it is not allowing , So I used the symbolic parameter PREVDTE to get the !PREVDT . The substitute of !PREVDT has done and I am planning to move symbolic parameter &PREVDTE to the sysin card file ..
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10350
Location: italy

PostPosted: Thu Nov 02, 2017 5:12 am    Post subject: Reply to: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

since the sysin data is not inline neither jes nor esp will substitute anything!
You have two options ...

1) inline the sort control cards,
2) add a step to customise the sort control cards

for clarity change inline to IN STREAM in my replies
Back to top
View user's profile Send private message
Venkichaitu

New User


Joined: 23 Aug 2014
Posts: 6
Location: india

PostPosted: Thu Nov 02, 2017 5:19 am    Post subject:
Reply with quote

You mean to say that i need to use the sysin dd * and the sort card
i have tried that also but it is not working .. I am ready to do the customize the control card for my requirements ..
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10350
Location: italy

PostPosted: Thu Nov 02, 2017 5:50 am    Post subject: Reply to: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

what I mean is

with a job like
Code:
//jobname  JOB  ...,...,...
//stepname EXEC ...
//dddame   DD   *
...
...
&SYMBOL1
&SYMBOL2
...
...

or with a job like

Code:
//jobname  JOB  ...,...,...
//stepname EXEC ...
//dddame   DD   *
...
...
!SYMBOL1
!SYMBOL2
...
...

JES or ESP will perform the symbol substitution - the data is IN STREAM


but if the job looks like

Code:
//jobname  JOB  ...,...,...
//stepname EXEC ...
//dddame   DD   DSN=some.dataset.name,...,...


You will have to find a way to perform the symbol substitution Yourself
because neither jJES or ESP will look at the data contained in some.dataset.name
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1922
Location: UK

PostPosted: Thu Nov 02, 2017 3:50 pm    Post subject:
Reply with quote

Quote:
Can you please give the how to use this export and SET combination in my case

This is not a manual reading service - read the JCL manual yourself.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Thu Nov 02, 2017 7:30 pm    Post subject: Re: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

Venkichaitu,

The combination like this will not work anyway, either your parameters have been substituted, or not.
Code:
//  SET  PREVDTE='20171030' 
Code:
  OUTREC FIELDS=(. . . . . . .
                36:&PREVDTE,     ---- this is giving issue while running the job
                      * 

Do you understand at least this simple thing?
Have you ever read any SORT manual? Any JCL manual? Any "computer programming" manual?
Have you ever created any WORKING program in ANY language - by yourself, not copy-pasted from some forums?
Back to top
View user's profile Send private message
Venkichaitu

New User


Joined: 23 Aug 2014
Posts: 6
Location: india

PostPosted: Sat Nov 04, 2017 3:30 am    Post subject: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

I have tried using the inline variable for that it is not working . please help me to resolve this issue ..

Example is :

OUTREC FIELDS=(01:5,2, * RECORD ID: PF
03:2C'0',
05:45,6, * PLAN, LEFT JUSTIFIED
11:6X,
17:1X,
18:51,9, * PARTICIPANT ID
27:6X, * SPACES
33:2X, * SPACES
35:1X,
36:!PREVDT,
44:1X,
45:68,3, * INVESTMENT, LEFT JUSTIFIED
48:6X,
61:151,15,SFF,EDIT=(TTTTTTTTTTTTTTTTS),SIGNS(,-)
78:1X),CONVERT
/*
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Sat Nov 04, 2017 4:25 am    Post subject:
Reply with quote

Saying something "is not working" is completely useless. What error message(s) do you get? Have you talked to your site support group? Have you read up on the EXPORT and SET statements in the JCL Reference manual? I have used EXPORT and SET with a SYMBOLS DD statement on my z/OS 2.1 system, so I know it works. If it is failing for you, then you do not have it set up correctly or your site support group has not set up in-stream symbols for the job class your job executes in (in which case only your site support group will be able to assist you).
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Sun Nov 05, 2017 9:55 pm    Post subject: Re: Need help how to pass the ESP variables in SYSIN CARD FILE
Reply with quote

Venkichaitu wrote:
I have tried using the inline variable for that it is not working . please help me to resolve this issue ..

Example is :

Prior to substitute variables, try to start with simple SORT examples with one sort field. Reading basic SORT/JCL manuals might help. Run YOURSELF 10-20-30 sort jobs CREATED BY YOU PERSONALLY. Then search for existing answers on various forums. Try to participate in the Beginners Forum.

Please, don't request other people just to do YOUR job, free of charge. People here usually help others to understand some strange or sophisticated issues, but do not provide ready solutions of others' job of the level "how to multiply 2*2"?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 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

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