IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Removing X'40' using Fileaid copy utility in JCL


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Tue Jan 11, 2011 1:41 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 11, 2011 1:53 pm
Reply with quote

$$DD01 DROP IF=(1,EQ,C’ ’)
Back to top
View user's profile Send private message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Tue Jan 11, 2011 3:11 pm
Reply with quote

Thanks Peter...it worked great..you guys rock!!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jan 11, 2011 3:17 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 11, 2011 3:29 pm
Reply with quote

ksouren007 wrote:
Thanks Peter...it worked great..you guys rock!!


i know icon_rolleyes.gif
Back to top
View user's profile Send private message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Tue Jan 11, 2011 3:45 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jan 11, 2011 5:15 pm
Reply with quote

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
View user's profile Send private message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Thu Jan 13, 2011 2:11 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 13, 2011 2:27 pm
Reply with quote

OMIT COND=(1,1,CH,EQ,C' ')
SORT FIELDS=COPY
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jan 13, 2011 3:50 pm
Reply with quote

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... icon_neutral.gif and this does not give me a clear picture what are you looking for?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jan 13, 2011 3:52 pm
Reply with quote

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
View user's profile Send private message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Thu Jan 13, 2011 4:14 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 13, 2011 4:16 pm
Reply with quote

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
View user's profile Send private message
ksouren007

New User


Joined: 30 Jun 2010
Posts: 85
Location: Toronto, ON

PostPosted: Thu Jan 13, 2011 4:38 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts REASON 00D70014 in load utility DB2 6
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top