JCL to update 15000 entries



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

Re: JCL to update 15000 entries

Postby Frank Yaeger » Wed Aug 27, 2008 3:35 am

Dick,

I just read back through all of the posts and I think you're right. The first post does say

I have the 15000 user record's in a DATASET.


I guess all the talk about commands confused me - I thought he was asking how to change fields in an input file, not how to generate commands from an input file.

If the OP had just said in his first post:

******
I have 15000 user records in a dataset. I want to generate 15000 commands like this:

CHANGE <userid> REGION(rgn)

where userid is at positions a-b in the file and rgn is at positions c-d in the file.
******

then it all would have made sense.

jaga123,

Is that what you actually want? If so, then give the starting position, length and format of the userid and rgn fields in your input records, give the RECFM and LRECL of the input file and the output file you want to generate, and show an example of the input records and what you expect for output.
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 4:56 am

Now we wait. . . . :)

d
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 jaga123 » Wed Aug 27, 2008 9:25 am

dick scherrer wrote: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. . . .
Hi Dick,

What you have said is correct.

Thanks
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 » Wed Aug 27, 2008 9:00 pm

jaga123,

Did you miss my post after Dick's where I said:

jaga123,

Is that what you actually want? If so, then give the starting position, length and format of the userid and rgn fields in your input records, give the RECFM and LRECL of the input file and the output file you want to generate, and show an example of the input records and what you expect for output.


Please supply the requested information.
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 » Thu Aug 28, 2008 9:27 am

jaga123,

Is that what you actually want? If so, then give the starting position, length and format of the userid and rgn fields in your input records, give the RECFM and LRECL of the input file and the output file you want to generate, and show an example of the input records and what you expect for output.

Please find the details below
RECFM=FB(both input and Output file)
LRECL=80(Both input and Output file)
User id: Starting position=8, length=12, Format=CH
Region: Starting position=61, lenght=6, Format=CH

My input record looks like
-------------------------------------
User id Name Region
-------------------------------------
TER001 Suzanne UK

Required Ouput is like

-------------------------------------
User id Name Region
-------------------------------------
TER001 Suzanne AUS

Apologies for not explaining clearly. Does it make sense now?

Thanks
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 » Thu Aug 28, 2008 9:02 pm

The input example I was asking for is the one containing the userid and region code you want to use to generate the CHANGE statements. The output example I was asking for is the expected generated CHANGE statements. I don't know if that's what you're showing me or not.

But let's assume the input file to be used to generate the CHANGE statements has the userid field as 8,12,CH and the region field as 61,6,CH. Let's further assume you want to use that input file to generate CHANGE statements like this:

CHANGE userid REGION(region)

You can use this DFSORT job:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(C'CHANGE ',8,12,
      C' REGION(',61,6,SQZ=(SHIFT=LEFT,LENGTH=7,TRAIL=C')'),80:X)
/*


As an example, if your input file had these records:

       USER1                                                AUS   
       USER00000002                                         ABCDEF
       U5                                                   A     


These CHANGE statements would be generated in SORTOUT:

CHANGE USER1        REGION(AUS)   
CHANGE USER00000002 REGION(ABCDEF)
CHANGE U5           REGION(A)     


Is that what you need?
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 Sep 16, 2008 1:27 pm

This is exactly what i am looking for.

Thanks a lot for your assistance.

:)
jaga123
 
Posts: 9
Joined: Thu Aug 21, 2008 2:52 pm
Has thanked: 0 time
Been thanked: 0 time

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post