Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Create an Command Dataset with DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Create an Command Dataset with DFSORT
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 Moderator


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

PostPosted: Fri May 15, 2009 9:39 pm    Post subject:
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    Post subject: Reply to: Create an Command Dataset with DFSORT
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    Post subject:
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    Post subject: Reply to: Create an Command Dataset with DFSORT
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    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 Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us