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

Need help how to pass the ESP variables in SYSIN CARD FILE


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
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
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 02, 2017 4:48 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Thu Nov 02, 2017 5:02 am
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Thu Nov 02, 2017 5:12 am
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Thu Nov 02, 2017 5:50 am
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: 2454
Location: Hampshire, UK

PostPosted: Thu Nov 02, 2017 3:50 pm
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

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Thu Nov 02, 2017 7:30 pm
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
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sat Nov 04, 2017 4:25 am
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

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Sun Nov 05, 2017 9:55 pm
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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
No new posts Repeat n times by substuting SEQNUM i... DFSORT/ICETOOL 2
No new posts SORT CARD meaning please DFSORT/ICETOOL 3
No new posts Add condition to a FINDREP SORT card DFSORT/ICETOOL 4
Search our Forums:

Back to Top