View previous topic :: View next topic
|
Author |
Message |
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
Hi,
I have the following requirement for which I have to use Fileaid copy utility in my JCL (Not Sort) and I need to remove the spaces while copying.
Please can anyone help me with the SYSIN card that I could use for the same?
IP/OP- Flat File: FB=26
Code: |
=COLS> ----+----1----+----2----+-
****** **************************
000001 00100095000000049866213001
000002
000003
000004
000005
000006
000007
000008
000009 00100095000000058209305001
000010
000011
000012
000013
000014
000015
000016
000017 00100095000000058209313001
|
The gaps in between are spaces which i want to remove and want the OP File like below.
Code: |
=COLS> ----+----1----+----2----+-
****** **************************
000001 00100095000000049866213001
000009 00100095000000058209305001
000017 00100095000000058209313001
|
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
$$DD01 DROP IF=(1,EQ,C’ ’) |
|
Back to top |
|
|
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
Thanks Peter...it worked great..you guys rock!! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
I have the following requirement for which I have to use Fileaid copy utility in my JCL (Not Sort) |
I wonder why somebody defines such stupid requirements ?
there is a task to be done, why enforce restrictions!
apart that, from a stability and resources safeguard SORT would be the best choice
FILEAID might be dropped ( trying to save on the budget )
SORT ... much more unlikely |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
ksouren007 wrote: |
Thanks Peter...it worked great..you guys rock!! |
i know |
|
Back to top |
|
|
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
Quote: |
I wonder why somebody defines such stupid requirements ?
|
Coz along with the above space removal, i have an empty file check condition too for which i dont have DFSORT(ICETOOL) available and I dont know whether IDCAMS allows both conditions together during a REPRO. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I think that you will find that both DFSORT and SYNCSORT can issue a non zero return code for an empty file.
Use the SEARCH button at the top of any page and find out. |
|
Back to top |
|
|
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
I checked on the below but not sure whther it would work consistently after getting dynamically substituted by SYNCTOOL. And searching the forum for an equivalent SYNCSORT solution along with the space removal did not yeild any results for me...may b bcoz f my bad searching!
// EXEC PGM=ICETOOL
// TOOLMSG DD SYSOUT=*
// DFSMSG DD SYSOUT=*
//INDD DD DSN=INPUT FILE,DISP=SHR
//TOOLIN DD *
COUNT FROM(INDD) EMPTY
/*
IF THE FILE IS EMPTY , IT WILL SET RC=12
If the above works fine with SYNCSORT could you please let me know how to add $$DD01 DROP IF=(1,EQ,C’ ’) in the above?? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
OMIT COND=(1,1,CH,EQ,C' ')
SORT FIELDS=COPY |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
ksouren007 wrote: |
I checked on the below but not sure whther it would work consistently after getting dynamically substituted by SYNCTOOL. |
That means your site (or at least the LPAR you execute your job) is using SyncSort as a SORT product. SyncSort sites, usually, alias, ICETOOL to SYNCTOOL. Even if you code PGM=ICETOOL, that deos not mean DFSORT's ICETOOL will come to your service (as the supporting product is anyways not installed); and under the covers SYNCTOOL will be invoked.
Quote: |
If the above works fine with SYNCSORT could you please let me know how to add $$DD01 DROP IF=(1,EQ,C’ ’) in the above?? |
Well, you are mixing things - $$DD01 is for file-aid and you showed an example fo ICETOOL (SYNCTOOL) and asked for a subsitute in ICETOOL job... and this does not give me a clear picture what are you looking for? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Quote: |
Coz along with the above space removal, i have an empty file check condition too for which i dont have DFSORT(ICETOOL) available and I dont know whether IDCAMS allows both conditions together during a REPRO. |
Do you wish to execute some other step, do something different, when file is empty, comapred to when file is not empty? If not - why do you worry about the file being empty? |
|
Back to top |
|
|
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
May b reading through all the posts on this page from top would have given a clear picture of what I was looking for. Neways coming again to the point represents somewhat which looks like below:
1. My site has SYNCSORT installed.
2. I am doing some specific operations afterwards if the file is empty.
3. I have already achieved the same through file-aid.
4. Now I am looking for a SYNCSORT alternative of the same.
5. And want EQUIVALENT to $$DD01 DROP IF=(1,EQ,C’ ’) to add in the below sortcard to which Peter has replied.
// EXEC PGM=ICETOOL
// TOOLMSG DD SYSOUT=*
// DFSMSG DD SYSOUT=*
//INDD DD DSN=INPUT FILE,DISP=SHR
//TOOLIN DD *
COUNT FROM(INDD) EMPTY
/* |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
This is what i replied for your syncsort. I guess you didnt read all comments.
PeterHolland wrote: |
OMIT COND=(1,1,CH,EQ,C' ')
SORT FIELDS=COPY |
|
|
Back to top |
|
|
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
Quote: |
5. And want EQUIVALENT to $$DD01 DROP IF=(1,EQ,C’ ’) to add in the below sortcard to which Peter has replied.
|
Thanks all for your help!! |
|
Back to top |
|
|
|