|
View previous topic :: View next topic
|
| Author |
Message |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
HI Friends,
I have a file length of 1200 and I want to find if there is any data between 210 to 1200 . if not spaces i need to write to another file.
| Code: |
SORT FIELDS=COPY
INCLUDE COND=((210,990,CH,NE,C' ') |
CAN YOU please suggest if my approach is correct |
|
| Back to top |
|
 |
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
What happened when you tried it.
Check this post. |
|
| Back to top |
|
 |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
| mistah kurtz wrote: |
What happened when you tried it.
Check this post. |
I think there is a limit in sort on the position that validates for any condition. its working when i give postion 10 or 20 but when I give position 900 throwing error
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(212,788,CH,NE,C' ')
*
INSTALLATION OPTIONS IN MFXPRMIT WILL BE USED
INCLUDE/OMIT INVALID LENGTH |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| The manual indicates a limit of 256 bytes for CH comparisons. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
1) Your logic is wrong
2) Your syntax was wrong, too
| Code: |
SORT FIELDS=COPY
INCLUDE COND=(210,990,SS,NE,C' ') |
|
|
| Back to top |
|
 |
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
| You can try SS option |
|
| Back to top |
|
 |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
| mistah kurtz wrote: |
| You can try SS option |
I coded as below but still not working.
| Code: |
SORT FIELDS=COPY
OMIT COND=((212,200,CH,NE,C' '),AND,(412,200,CH,NE,C' '),AND,
(612,200,CH,NE,C' '),AND,(812,200,CH,NE,C' '))
|
|
|
| Back to top |
|
 |
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
| Quote: |
| I coded as below but still not working. |
It's not very useful. Could you please try with what sergeyken suggested and post the full sysout. |
|
| Back to top |
|
 |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
| mistah kurtz wrote: |
| Quote: |
| I coded as below but still not working. |
It's not very useful. Could you please try with what sergeyken suggested and post the full sysout. |
its not working though
| Code: |
SORT FIELDS=COPY
INCLUDE COND=(212,200,SS,NE,C' ') |
even with length as 900 its not working...file has many records but throwing empty file.
| Code: |
********************************* TOP OF DATA **********************************
SYNCSORT FOR Z/OS 2.1.4.0R U.S. PATENTS: 4210961, 5117495 (C) 2014 SYNCSO
STATE OF WISCONSIN - DET SERVICES, ESD HELPDESK: 608-264-9383 80
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 5E6E7, MODEL 3906 704 LICEN
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(212,890,SS,NE,C' ')
WER813I INSTALLATION OPTIONS IN MFXPRMIT WILL BE USED
WER276B SYSDIAG= 7953145, 12350668, 12350668, 25550320
WER164B 6,904K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,376K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 1200; BLKSIZE= 27600
WER073I SORTIN : DSNAME=DWDCARES.RT41.D07111
WER110I SORTOUT : RECFM=FB ; LRECL= 1200; BLKSIZE= 27600
WER074I SORTOUT : DSNAME=DWDCARES.CAREF.DESIGN
WER410B 5,876K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER410B 0 BYTES RESERVE REQUESTED, 2,228K BYTES USED
WER055I INSERT 0, DELETE 23331
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTIN : EXCP'S=57,UNIT=3390,DEV=6458,CHP=28292A2BA8A9AAAB,VOL=SLR04
WER416B SORTOUT : EXCP'S=0,UNIT=3390,DEV=60BF,CHP=28292A2BA8A9AAAB,VOL=SHR027
WER416B TOTAL OF 57 EXCP'S ISSUED FOR COPYING
WER054I RCD IN 23331, OUT 0
WER169I RELEASE 2.1 BATCH 0539 TPF LEVEL 4.0
WER052I END SYNCSORT - PWCCRDES,STEP020,,DIAG=AE00,710A,8200,004E,E6FE,48A3,06 |
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| ram_vizag wrote: |
| mistah kurtz wrote: |
| You can try SS option |
I coded as below but still not working.
| Code: |
SORT FIELDS=COPY
OMIT COND=((212,200,CH,NE,C' '),AND,(412,200,CH,NE,C' '),AND,
(612,200,CH,NE,C' '),AND,(812,200,CH,NE,C' '))
|
|
1) Please, learn some basics of logical operations. Your example is senseless
2) You are given ready-to-use solution above. Stop re-inventing the wheel. Force self-education. |
|
| Back to top |
|
 |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
| sergeyken wrote: |
| ram_vizag wrote: |
| mistah kurtz wrote: |
| You can try SS option |
I coded as below but still not working.
| Code: |
SORT FIELDS=COPY
OMIT COND=((212,200,CH,NE,C' '),AND,(412,200,CH,NE,C' '),AND,
(612,200,CH,NE,C' '),AND,(812,200,CH,NE,C' '))
|
|
1) Please, learn some basics of logical operations. Your example is senseless
2) You are given ready-to-use solution above. Stop re-inventing the wheel. Force self-education. |
I used SS but its not working. |
|
| Back to top |
|
 |
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
| You have Syncsort not DFSORT. Please check the Syncsort manual what it says about comparisons. |
|
| Back to top |
|
 |
Pandora-Box
Global Moderator
.jpg)
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Are you sure the contents of the file has spaces and not low values?
Can you also check for X'00' ??
Also moved the topic to right forum |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Looks like the OP is trying to exclude all-blanks in positions 210 thru 1200 into one output, ie INCLUDE records with ANY non blank character in ANY of these positions.
The SS 'solution' suggested above does not seem to apply to the OP's problem. It INCLUDEs records with ALL the positions 210 thru 1200 filled with non-blank characters. (the OP might not have such a record and ended up with an empty output).
Changing the NEs to EQs in OP's original control card like this would have been one of the options.
| Code: |
SORT FIELDS=COPY
OMIT COND=(212,256,CH,EQ,C' ',AND,
468,256,CH,EQ,C' ',AND,
724,256,CH,EQ,C' ',AND,
980,.........) |
|
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|