|
View previous topic :: View next topic
|
| Author |
Message |
Mukesh.py Currently Banned New User
Joined: 22 Sep 2008 Posts: 17 Location: Chennai, India.
|
|
|
|
Hi everybody. please help me by providing a test JCL solution . my requirement is as follows :
i/p file
113893 aaaba gfgfg89898
114176 fdgdfg dgdfgdfgdfg
122661 dsgfds efdfdfdfdfffr
122662 sdfdffe dfdfdfdfdse
122663 dfgfgfg dgfdfgdfgd
122664 dfdfdff sdfdfdfdfdf
122665 sdfdfdf dfdfdfdfdfd
i want to copy a set of records to an o/p whose first 1-7 ch report values are known. example if report numbers are 113893 , 122662 and 122665 then the o/p file shoud contain the records :
o/p file
113893 aaaba gfgfg89898
122662 sdfdffe dfdfdfdfdse
122665 sdfdfdf dfdfdfdfdfd
Regards, |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I assume that by posting in the JCl forum that your product is SYNCSORT rather than DFSORT.
Please use the search button at the top of the page as this topic has been discussed so many times before, with lots of ideas and solutions available in past threads.
As a hint use SORT INCLUDE as your keywords. |
|
| Back to top |
|
 |
Mukesh.py Currently Banned New User
Joined: 22 Sep 2008 Posts: 17 Location: Chennai, India.
|
|
|
|
can anyone tell me the difference between
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(1,7,CH,EQ,C'113893',OR,
1,7,CH,EQ,C'114176')
-----------------AND-------------------
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(1,7,CH,EQ,C'113893')
OUTFIL FILES=01,INCLUDE=(1,7,CH,EQ,C'114176')
I am not sure whether this second code is going to run? I am on hold to submit the JCL now.. Plz give suggestions .....
Regards, |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Mukesh,
Submit and see what happens....  |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
| Quote: |
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(1,7,CH,EQ,C'113893')
OUTFIL FILES=01,INCLUDE=(1,7,CH,EQ,C'114176')
|
file01 contains records satisfying only first condition even if its disp is mod.
But i dont know why.. Can anybody flash light on reason behind it? |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| Quote: |
| Can anybody flash light on reason behind it? |
If you give the same file-id more than once in an OUTFIL group, Syncsort will process only the first OUTFIL and simply ignores the rest. Hope this helps |
|
| Back to top |
|
 |
Mukesh.py Currently Banned New User
Joined: 22 Sep 2008 Posts: 17 Location: Chennai, India.
|
|
|
|
| how to avoid giving file id more than once and copy more than one records in the above example ? please suggest. |
|
| Back to top |
|
 |
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
| Mukesh.py wrote: |
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(1,7,CH,EQ,C'113893',OR,
1,7,CH,EQ,C'114176')
-----------------AND-------------------
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(1,7,CH,EQ,C'113893')
OUTFIL FILES=01,INCLUDE=(1,7,CH,EQ,C'114176')
Regards, |
What is your other JCL doing |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| Mukesh.py wrote: |
can anyone tell me the difference between
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(1,7,CH,EQ,C'113893',OR,
1,7,CH,EQ,C'114176')
-----------------AND-------------------
Regards, |
Did you try the above jcl? |
|
| Back to top |
|
 |
Mukesh.py Currently Banned New User
Joined: 22 Sep 2008 Posts: 17 Location: Chennai, India.
|
|
|
|
| i have not submitted it yet. authorization issue... in both the jcls i am trying to ask whether any one of them meets my requirement. 2nd one is for sure from the above discussions that it wont work. |
|
| Back to top |
|
 |
Mukesh.py Currently Banned New User
Joined: 22 Sep 2008 Posts: 17 Location: Chennai, India.
|
|
|
|
arcvns, are you trying to say that the below code will work for my requirement?
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(1,7,CH,EQ,C'113893',OR,
1,7,CH,EQ,C'114176') |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| I think it should work for you. Make sure that the control statements dont start at pos-1 |
|
| Back to top |
|
 |
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
| Mukesh.py wrote: |
i want to copy a set of records to an o/p whose first 1-7 ch report values are known. example if report numbers are 113893 , 122662 and 122665 then the o/p file shoud contain the records :
o/p file
113893 aaaba gfgfg89898
122662 sdfdffe dfdfdfdfdse
122665 sdfdfdf dfdfdfdfdfd |
The following SyncSort for z/OS 1.3 job will produce the requested output:
| Code: |
//SORT1 EXEC PGM=SORT
//SORTIN DD *
113893 AAABA GFGFG89898
114176 FDGDFG DGDFGDFGDFG
122661 DSGFDS EFDFDFDFDFFFR
122662 SDFDFFE DFDFDFDFDSE
122663 DFGFGFG DGFDFGDFGD
122664 DFDFDFF SDFDFDFDFDF
122665 SDFDFDF DFDFDFDFDFD
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(1,7,CH,EQ,L(C'113893 ',C'122662 ',C'122665 '))
/* |
|
|
| Back to top |
|
 |
quanzhong
New User
Joined: 12 Aug 2008 Posts: 46 Location: china
|
|
|
|
Hi,Alissa
| Quote: |
INCLUDE COND=(1,7,CH,EQ,L(C'113893 ',C'122662 ',C'122665 '))
|
what L in 'L(C'113893 ',C'122662 ',C'122665 ')' means? though when i remove it, I got a abend.. thanks. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| SyncSort for z/OS Release 1.3 Manual wrote: |
• INCLUDE/OMIT statements with EQ/OR and NE/AND conditions can now be simplified from having to restate the same field data (p,l,f) when the field is compared with more than one constant.
For example,
INCLUDE COND=1,2,CH,EQ,C'NY',OR,1,2,CH,EQ,C'NJ',OR,1,2,CH,EQ,C'CT',OR,1,2,CH,...) can bewritten more simply as
INCLUDE COND=(1,2,CH,EQ,L(C'NY',C'NJ',C'CT',...)). |
|
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| what L in 'L(C'113893 ',C'122662 ',C'122665 ')' means? |
The L tells Syncsort that what comes between () is a list of literals. |
|
| Back to top |
|
 |
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
| quanzhong wrote: |
| what L in 'L(C'113893 ',C'122662 ',C'122665 ')' means? |
As per the same manual arcvns referred to:
| Quote: |
The compared constants are grouped together in parenthesis preceded by 'L' for 'list".
...If EQ is specified, the comparison conjunction OR is implied in the statement. If NE is specified, the comparison conjunction AND is implied in the statement... |
Hope this helps. Let me know if you have any further questions. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|