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

Create an Command Dataset with DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Roland_Achtsnit

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Fri May 15, 2009 5:15 pm
Reply with quote

Hi All


Input File = VBA 133 (position of xxucat01 = 22 and for Namea also 22)

catalog --- xxucat01
alias Namea
catalog --- yyucat01
catalog --- zzucat01
alias Nameb
alias Namec
alias Named

The Output File should be: (VBA 133) and contain the following
IDCAMS Commands.
DEFINE ALIAS (NAME(Namea) REL(xxucat01))
DEFINE ALIAS (NAME(Nameb) REL(zzucat01))
DEFINE ALIAS (NAME(Namec) REL(zzucat01))
DEFINE ALIAS (NAME(NAMEd) REL(zzucat01))


Some catlog --- statements contain up to 500 alias entries.

Can I do this with DFSORT?
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: Fri May 15, 2009 9:39 pm
Reply with quote

Quote:
position of xxucat01 = 22 and for Namea also 22


Does that starting position count the 4 byte RDW and 1 byte carriage control character, or is it the data position so the real position is 22+5 = 27?

What is the starting position of 'catalog'?

What is the starting position of 'alias'?
Back to top
View user's profile Send private message
Roland_Achtsnit

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Fri May 15, 2009 10:24 pm
Reply with quote

Hi Frank

The starting positions contains the 4 bytes RDW + the 1 byte
carriage control character.

The starting position of catalog is 10
The starting position of alias is 16

Roland
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 15, 2009 10:58 pm
Reply with quote

Rolant_Achtsnit,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD DSN=Your input 133 vba dataset,disp=shr
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(10,7,CH,EQ,C'CATALOG'),   
  PUSH=(31:22,8))                                           
  OUTREC IFTHEN=(WHEN=INIT,                                 
  OVERLAY=(22:22,22,SQZ=(SHIFT=LEFT,LEAD=C'(',MID=C') REL(',
           TRAIL=C'))')))                                   
                                                             
  OUTFIL INCLUDE=(16,5,CH,EQ,C'ALIAS'),                     
  BUILD=(1,5,C'DEFINE ALIAS (NAME',22,22,133:X)
/*
Back to top
View user's profile Send private message
Roland_Achtsnit

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Sat May 16, 2009 5:27 pm
Reply with quote

Wow

It works fine.

Thanks

Roland
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top