Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Removing X'40' using Fileaid copy utility in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: Removing X'40' using Fileaid copy utility in JCL
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 11, 2011 1:53 pm    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jan 11, 2011 3:17 pm    Post subject: Reply to: Removing X'40' using Fileaid copy utility in JCL
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 11, 2011 3:29 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jan 11, 2011 5:15 pm    Post subject:
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 13, 2011 2:27 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jan 13, 2011 3:50 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jan 13, 2011 3:52 pm    Post subject:
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 13, 2011 4:16 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us