How to get values from a dataset with JCL

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to get values from a dataset with JCL

Postby clesilva11 » Tue Feb 06, 2018 7:33 am

Hello All,

I am a beginner with JCL, and i have the JCL below to define the ALIAS to a new TSO ID....

/*JOBPARM SYSAFF=LPAR                                        
//SYSTSPRT  DD  DSN=USERID.ALIAS.TXT,                          
//          DISP=(NEW,CATLG),DCB=(RECFM=FB,LRECL=133)          
//*YSTSPRT  DD  SYSOUT=*                                        
//SYSPRINT  DD SYSOUT=*                                        
//SYSTSIN   DD *                                                

But in this case, I would like to know how this JCL can read a dataset with a lot of IDs, to define the ALIAS to all those IDs.
This dataset with IDs organized as follows:


I saw another JCL with this same structure, but I couldn't copy the content for business restrictions.
Somebody could you please help me with this question?

Thank you so much for all attention.

Edited to use code tags
Posts: 1
Joined: Tue Feb 06, 2018 7:22 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to get values from a dataset with JCL

Postby willy jensen » Tue Feb 06, 2018 1:45 pm

Well, JCL can certainly refer to a dataset with your commands in it. So use you favorite editor to change the dataset with the userids to a list of the actual DEFINE commands, then change the SYSTSIN DD to refer to that dataset. You cannot use JCL to build your commands, for that you need a program.
willy jensen
Posts: 446
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 68 times

Re: How to get values from a dataset with JCL

Postby NicC » Tue Feb 06, 2018 4:37 pm

Please use the code tags to present data, code, screen 'shots' (cut'n'paste) or anything else requiring a fixed pitch font as seen on your terminal.
code tag format:
start:- open square bracket([),"code",close square brackets(])
end :- open square bracket([),"/code",close square brackets(])
concatenate all together without the double quotes or commas.

Many people seem to mis-understand what JCL is.
Although the 'L' in JCL stands for 'Language' JCL is not executable.
JCL does not manipulate data, it does not even look at data.
JCL is like a memo from you to the Operating System (OS) requesting it (the OS) to run one or more programs.
The JCL specifies some, or all, the resources required to accomplish the requested tasks.
When the JCL is read the OS reads it and sets up whatever it requires to do the tasks defined in the JCL.
It then DISCARDS the JCL, i.e. writes it to the output spool, never to look at it again.
The OS then runs the program(s) in accordance with the information it has extracted.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Global moderator
Posts: 3026
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Return to JCL


  • Related topics
    Last post