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
 

 

DFSORT - Add a trailing quote

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vikirum

New User


Joined: 26 Apr 2007
Posts: 30
Location: Chennai

PostPosted: Tue Jul 24, 2007 12:57 pm    Post subject: DFSORT - Add a trailing quote
Reply with quote

Hello E'body:

I have a question on a situation I have encountered now. Just a brief run down on my situation which will say why I need your help.

==> I have a huge list of file listing which I generate from the mainframes using a batch job and do a bit of manipulation in the UNIX environment. The listing would basically have VSAM files(CLUSTER/DATA/INDEX and AIX) and NONVSAM files together and my processing in JAVA is based on the classification I list on the listing file.

Strangely, now many files seem to have Migrated(HMIGRAT2 and HMIGRAT1) in Mainframe region and my listing does not show the VSAM files as CLUSTER/DATA/INDEX, Instead it shows them all as NONVSAM. Which is not what I need.

So I did a little bit of research to find out that HLIST will help me get the list of all Migrated datasets in batch and I am trying to use JCL to help me recall all the Migrated datasets before I get the file listing to identify the datasets in the DASD.

Now, that I told you what I wanted, I have a 56 byte file created with all the migrated dataset names and I have even managed to include a field "HRECALL ' " before the dataset names using SORT method. Please see the attached documentation for better clarity.

Just when I thought every thing was easy, I am dumbstruck when I see that I cannot put a trailing quote because the datasets are variant in length . icon_cry.gif

May I please request someone of you to help me find a solution for this. Also, I don't think I need a solution with the SQZ function because this will mean I have to talk with the system folks who just don't seem to understand what I say - Ever.

So an alternate solution, if possible would be mighty helpful.

P.S I have already checked the posting for any similar solutions and could not find them. I may have missed a few links in my haste. Please let me know if I did something like that.

Thanks much all for your help in advance

Vik Rajagopalan
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jul 24, 2007 1:54 pm    Post subject:
Reply with quote

DFSORT can "squeeze", use inrec and add the trailing quote and use a build/overlay with JFY or possibly SHIFT LEFT.....
INREC and OUTREC Enhancements
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 24, 2007 10:34 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you want:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,80,JFY=(SHIFT=LEFT,TRAIL=C''''))
/*


However, it does use DFSORT's JFY function and you'll need the April, 2006 DFSORT PTF for that.

But you said
Quote:
Also, I don't think I need a solution with the SQZ function because this will mean I have to talk with the system folks who just don't seem to understand what I say - Ever.
which maybe means that you don't have the April, 2006 DFSORT PTF and can't get your System Programmers to install it?

Quote:
So an alternate solution, if possible would be mighty helpful.


If you have the Dec, 2004 DFSORT PTF you can probably use IFTHEN clauses to look for a blank at the end of your dsnames wherever the blanks could start and replace the first blank with an apostrophe. But if the blanks can start at say position 11, that would be a lot of IFTHEN statements to look for the blank from position 11-80. JFY is obviously a lot easier to use and more efficient.
Back to top
View user's profile Send private message
vikirum

New User


Joined: 26 Apr 2007
Posts: 30
Location: Chennai

PostPosted: Wed Jul 25, 2007 8:52 am    Post subject: Re: DFSORT - Add a trailing quote
Reply with quote

Frank,

Is it possible to let me know how to figure out the space in the end of each record - recursively for the entire listing using IFTHEN clause?


Thanks very much

Vik Rajagopalan.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jul 25, 2007 8:56 pm    Post subject:
Reply with quote

Quote:
Is it possible to let me know how to figure out the space in the end of each record - recursively for the entire listing using IFTHEN clause?


Sorry, but I don't understand what you're asking for. Please state what you want more clearly.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


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