JCL to update 15000 entries



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

JCL to update 15000 entries

Postby jaga123 » Thu Aug 21, 2008 2:59 pm

Hi

I have to change the value of "Region Code" for 15000 user records. I have the 15000 user record's in a DATASET.

The command which is used to change the region code for a single user record is

CHANGE <USER ID> region(AUS)

But, i have to update the region code for 15000 records. So is it possible to do this via JCL? If so, please provide me the steps.
jaga123
 
Posts: 9
Joined: Thu Aug 21, 2008 2:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to update 15000 entries

Postby Bill Dennis » Thu Aug 21, 2008 7:07 pm

Is this an ISPF "CHANGE" command? Add ALL to the command to change all occurences.
CHANGE <USER ID> region(AUS) ALL

If this is some other product or you have special requirements, please explain.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to update 15000 entries

Postby Frank Yaeger » Thu Aug 21, 2008 8:30 pm

jaga123,

If you want to change all occurrences of '<USER ID>' to 'region(AUS)' in all of your records, you can use DFSORT's new FINDREP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC FINDREP=(IN=C'<USER ID>',OUT=C'region(AUS)')
/*


If you don't have PTF UK90013, ask your System Programmer to install it.

For complete details on the new FINDREP function and the other new functions available with PTF UK90013, see:

http://www.ibm.com/systems/support/stor ... /mvs/ugpf/
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: JCL to update 15000 entries

Postby jaga123 » Mon Aug 25, 2008 4:50 pm

hi all,

Thanks a lot for your assistance.

DFSORT is available in my machine.

My requirement is not to change all occurrences of '<USER ID>' to 'region(AUS)'. It is to change the region code to AUS for all the 15000 user accounts.

for example:
User account is "REFRES"
The Current region code is "UK".
Now i need to change the region code from "UK" to "AUS".
jaga123
 
Posts: 9
Joined: Thu Aug 21, 2008 2:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to update 15000 entries

Postby Frank Yaeger » Mon Aug 25, 2008 9:03 pm

My requirement is not to change all occurrences of '<USER ID>' to 'region(AUS)'. It is to change the region code to AUS for all the 15000 user accounts.


It's still not clear what you mean by this. What are the "rules" for identifying the region codes you want to change? What do the input records look like? What is it in a record that tells you the region code needs to be changed in that record?

If you want to change 'UK' to 'AUS' anywhere in your records, you can use these DFSORT control statements (similar to the previous ones):

  OPTION COPY
  INREC FINDREP=(IN=C'UK',OUT=C'AUS')


If you want to change 'x1', 'x2' and 'x3' to 'AUS' anywhere in your records, you can use these DFSORT control statements:

  OPTION COPY
  INREC FINDREP=(IN=(C'x1',C'x2',C'x3'),OUT=C'AUS')
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: JCL to update 15000 entries

Postby jaga123 » Tue Aug 26, 2008 2:36 pm

My input record is an User account like "TER01"(Login account to Mainframe MVS OS). "TER01" have Name, Salary number, Region Code etc.
Similarly, we have 15000 user accounts (like TER02, TER03..... TER15000).
The Security tool loaded over the OS replaces the default READY prompt with a different command prompt.
In the command prompt, i used to type,
CHANGE TER01 Region(AUS)
to change the region code of user account "TER01". This command works fine. But i can't do the same for 15000 user accounts by giving the command one by one manually.

I know that i can write a JCL that includes the Change command like above for 15000 user accounts. But i don't want to do that as it requires so much of manual work.

Hope this may explain clearly about my requirement. Is there any other way to do this?
jaga123
 
Posts: 9
Joined: Thu Aug 21, 2008 2:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL to update 15000 entries

Postby Frank Yaeger » Tue Aug 26, 2008 8:47 pm

It seems to me that any method you use would require identifying the 15000 user accounts in some way. If you don't have them in a file, then you'd have to type them in. If you do have them in a file, you could extract them automatically and use them in a job but I can't tell you what that job should be since I still don't know how the user account relates to the region code. You keep referring to commands that don't mean anything to me. You don't seem to be able to answer my questions or describe what you want to do in a general way with an example, so I can't help you.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: JCL to update 15000 entries

Postby dick scherrer » Wed Aug 27, 2008 1:35 am

Hello,

Please post 5 input "user account" records showing the fields you mentioned and their position in the record. Also post the recfm and lrecl of your input file.

Then post the 5 CHANGE statements you want generated from the 5 sample input records. As it will be used as "sysin" input, i suspect this file will be lrecl 80.

Please use the "Code" tag when posting the sample input and output.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: JCL to update 15000 entries

Postby Frank Yaeger » Wed Aug 27, 2008 2:11 am

Dick,

Are you assuming that:

CHANGE TER01 Region(AUS)

means if the user account at positions a-b = 'TER01', then change the region code at positions c-d to 'AUS'?

And how does showing 5 CHANGE statements help with 15000 CHANGE statements? As I said, unless the 15000 CHANGE statements are already in a file (which I've asked about before and not received confirmation of), how will they be generated - by hand? I wouldn't want to type in 15000 statements of any kind. Seems like the OP wants to pull these 15000 changes out of thin air.

I think the key here is:

I know that i can write a JCL that includes the Change command like above for 15000 user accounts. But i don't want to do that as it requires so much of manual work.


If the 15000 user accounts don't exist some place from which they can be extracted automatically, then they would have to be entered manually. The OP has given no indication that these 15000 user accounts exist some place other than in his head. If they do exist in a file, then he has to tell us where in that file they exist and how they can be identified for automatic extraction.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: JCL to update 15000 entries

Postby dick scherrer » Wed Aug 27, 2008 3:20 am

Hi Frank,

No, i'm guessing that there is a file that has ID, name, salary, region, and other fields with 15000 entries.

From these records, CHANGE records need to be created which will be a combination of literals and values from the file. The generated control statements would look like:
CHANGE idfromfile REGION(regnfromfile)
The CAPS are literals and the other 2 fields are from the file.

Once created, the "commands" could be issued in some batch job.

If i've understood. . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post