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

DFSORT - Add a trailing quote


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Tue Jul 24, 2007 1:54 pm
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 Developer


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

PostPosted: Tue Jul 24, 2007 10:34 pm
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
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 Developer


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

PostPosted: Wed Jul 25, 2007 8:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DFSORT GUID DFSORT/ICETOOL 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top