View previous topic :: View next topic
|
Author |
Message |
chvj123
New User
Joined: 13 Jun 2005 Posts: 8 Location: hyderabad
|
|
|
|
hi friends
i am having a file wich is having 1000 records , and i want to do sorting using jcl
in that i want to sort only the records in between 10 and 50 and i should stop after 50th recoed
and can i know the diffrence between sort, dfs sort, icetool, sync sort.
will they work the same ...
or any thing that differs ...[/b] |
|
Back to top |
|
|
chvj123
New User
Joined: 13 Jun 2005 Posts: 8 Location: hyderabad
|
|
|
|
i have a table wich consists of 10 colums , and i have to update only one column init , cani know how to do this using cursors |
|
Back to top |
|
|
chvj123
New User
Joined: 13 Jun 2005 Posts: 8 Location: hyderabad
|
|
|
|
hi friends
in jcl we have condition parameter in that i have 3 steps
so to check the return code of previous step wich lies between 21 to 44
so how shuld i code the thing in my jcl program
regards,
vj |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Quote: |
i have a table wich consists of 10 colums , and i have to update only one column init , cani know how to do this using cursors |
Cursor is used where there is in need of selection of multiple rows. since ur requirement is only one row y r u trying to do with cursor???? Try the simplest way my frnd |
|
Back to top |
|
|
dtalele Currently Banned New User
Joined: 25 Jan 2006 Posts: 13 Location: mumbai
|
|
|
|
HI,
chvj123,
fOLLOWING IS THE JCL FOR YOUR PROBLEM,
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=
//SORTOUT DD DSN=
//SORTWK01 DD UNIT=SYSDA
//SYSIN DD *
SKIPREC=n
STOPAFT=n
/*
SKIPREC SKIPS THE N RECORDS & STOPAFTER STOPS AFTER N RECORDS.
SO YOU CAN APPLY YOUR CASE ACCORDINGLY |
|
Back to top |
|
|
jimmy_augustine
New User
Joined: 06 Feb 2004 Posts: 1 Location: Ireland
|
|
|
|
khamarutheen wrote: |
Quote: |
i have a table wich consists of 10 colums , and i have to update only one column init , cani know how to do this using cursors |
Cursor is used where there is in need of selection of multiple rows. since ur requirement is only one row y r u trying to do with cursor???? Try the simplest way my frnd |
I dunno how this topic is in this question about JCL. how ever his question was to how to update using a curson when he have 10 columns in a table.
He just mentioned that he only want to update one column, not just one row. Any way, if you want to update using cursors, then declare a curson with update option. Then use the update sql with current option
Thanks |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
i am having a file wich is having 1000 records , and i want to do sorting using jcl
in that i want to sort only the records in between 10 and 50 and i should stop after 50th recoed
|
You can use a DFSORT job like the following to sort records 10-50. Change the SORT statement to specify the key(s) you want to sort on.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION SKIPREC=9,STOPAFT=41
SORT FIELDS=(1,5,CH,A)
|
Quote: |
and can i know the diffrence between sort, dfs sort, icetool, sync sort.
will they work the same ... |
DFSORT is IBM's sort product. Syncsort is Syncsort, Inc's sort product. SORT is a generic name for sort products. ICETOOL is a multipurpose utility that you get free with DFSORT.
For more information on DFSORT and DFSORT's ICETOOL, visit the DFSORT website at:
www.ibm.com/storage/dfsort/
DFSORT and Syncsort have similarities and differences. If you or anyone else on this board would like some documents prepared by the DFSORT Team that describe what we see as the advantages of DFSORT over Syncsort, as well as considersations for migrating from Syncsort to DFSORT, send me an e-mail offline (yaeger@us.ibm.com). Please put "DFSORT" somewhere in your Subject line to catch my attention. |
|
Back to top |
|
|
|