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
 

 

Couldn't Display the following string using OUTREC !

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Aug 28, 2008 7:04 pm    Post subject: Couldn't Display the following string using OUTREC !
Reply with quote

Hello all
I just want to display the following string using SORT - OUTFIL OUTREC command.
String - "LISTCAT ENTRIES('"FILE_NAME"')"

My pgm
---------
Code:


//R010     EXEC PGM=SORT,COND=(0,NE)                 
//SORTIN   DD  DSN=TSOXXXX.ADV124DP.HISTORY.VSAM,     
//             DISP=SHR                               
//SORTOUT  DD  DSN=TSOXXXX.PAS.CNTL.DEC07(ADV124RR), 
//             DISP=SHR                               
//SYSIN    DD  *                                     
 SORT FIELDS=COPY                                     
 OUTFIL OUTREC=(C'/*REXX*/',80:X,/,                   
          C'FILE_NAME="TSOXXXX.PAS.D',10,6,C'T*"',   
          C'"LISTCAT ENTRIES('"FILE_NAME"')"')       
/*                                                   
//SYSOUT   DD  SYSOUT=*       
                       


Im getting user abend for this.

My output should be
Code:

/*REXX*/                                 
  FILE_NAME="T.PAS.ACCSERST.PHASE3.*"     
  "LISTCAT ENTRIES('"FILE_NAME"')"     


Kindly reply your post !
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Aug 28, 2008 7:28 pm    Post subject:
Reply with quote

The string
Code:
C'"LISTCAT ENTRIES('"FILE_NAME"')"')
ends with the first quote as
Code:
C'"LISTCAT ENTRIES('
leaving the rest as garbage
Code:
"FILE_NAME"')"')
You need to quote the imbedded quotes...
Maybe such as
Code:
C'"LISTCAT ENTRIES('''"FILE_NAME"''')"')
?
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Aug 28, 2008 7:31 pm    Post subject:
Reply with quote

yup! I need to get the whole string with those symbol " ' ".
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: Thu Aug 28, 2008 7:36 pm    Post subject:
Reply with quote

As I usually refer people to use IGGCSIRX - here's an example

And, you can use wild cards as you do in 3.4

JCL
Code:

//STEP0020 EXEC PGM=IKJEFT01,PARM='CSITEMP'
//SYSEXEC  DD DSN=your REXX library,DISP=SHR         
//SYSOUT   DD SYSOUT=*                     
//SYSTSPRT DD SYSOUT=*                     
//SYSTSIN  DD DUMMY                       
//CATIN    DD *                           
ABC.*.TEST
BCD.TEST.**
etc
etc
/*                                         

REXX
Code:

/* REXX ** INVOKE CSI VIA BATCH REXX PROCESS                         */
 "EXECIO * DISKR CATIN ( STEM CAT. FINIS"
 DO KCNT = 1 TO CAT.0
 KEY = SUBSTR(CAT.KCNT,1,44)
MODRSNRC = SUBSTR(' ',1,4)
CSIFILTK = SUBSTR(KEY,1,44)
CSICATNM = SUBSTR(' ',1,44)
CSIRESNM = SUBSTR(' ',1,44)
CSIDTYPS = SUBSTR(' ',1,16)
CSICLDI  = SUBSTR('Y',1,1)
CSIRESUM = SUBSTR(' ',1,1)
CSIS1CAT = SUBSTR(' ',1,1)
CSIRESRV = SUBSTR(' ',1,1)
CSINUMEN = '0001'X
CSIFLD1  = 'VOLSER  '
CSIOPTS  = CSICLDI || CSIRESUM || CSIS1CAT || CSIRESRV
CSIFIELD = CSIFILTK || CSICATNM || CSIRESNM || CSIDTYPS || CSIOPTS
CSIFIELD = CSIFIELD || CSINUMEN || CSIFLD1
WORKLEN = 65536
DWORK = '00010000'X || COPIES('00'X,WORKLEN-4)
RESUME = 'Y'
CATNAMET = SUBSTR(' ',1,44)
DNAMET = SUBSTR(' ',1,44)
DO WHILE RESUME = 'Y'
 ADDRESS LINKPGM 'IGGCSI00  MODRSNRC  CSIFIELD  DWORK'
 RESUME = SUBSTR(CSIFIELD,150,1)
 USEDLEN = C2D(SUBSTR(DWORK,9,4))
 POS1=15
 DO WHILE POS1 < USEDLEN
   IF SUBSTR(DWORK,POS1+1,1) = '0'
    THEN DO
         CATNAME=SUBSTR(DWORK,POS1+2,44)
         IF CATNAME ^= CATNAMET THEN
          DO
           CATNAMET = CATNAME
          END
         POS1 = POS1 + 50
         END
   DNAME = SUBSTR(DWORK,POS1+2,44)
   IF SUBSTR(DWORK,POS1+1,1) = 'C' THEN DTYPE = 'CLUSTER '
    ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'D' THEN DTYPE = 'DATA    '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'I' THEN DTYPE = 'INDEX   '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'A' THEN DTYPE = 'NONVSAM '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'H' THEN DTYPE = 'GDS     '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'B' THEN DTYPE = 'GDG     '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'R' THEN DTYPE = 'PATH    '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'G' THEN DTYPE = 'AIX     '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'X' THEN DTYPE = 'ALIAS   '
     ELSE
      IF SUBSTR(DWORK,POS1+1,1) = 'U' THEN DTYPE = 'UCAT    '
     ELSE
      DTYPE = '        '
    POS1 = POS1 + 46
    NUMVOL = C2D(SUBSTR(DWORK,POS1+4,2))/6
    POS2 = POS1+6
    VOLSER. = ""
    DO I = 1 TO NUMVOL
      VOLSER.I = SUBSTR(DWORK,POS2,6)
      POS2 = POS2 + 6
    END
    IF DNAMET ^= DNAME THEN
    DO
     LISTVOL1 = VOLSER.1 ||" "|| VOLSER.2 ||" "|| VOLSER.3
     LISTVOL2 = VOLSER.4 ||" "|| VOLSER.5 ||" "|| VOLSER.6
     LISTVOL3 = VOLSER.7 ||" "|| VOLSER.8 ||" "|| VOLSER.9
     SAY  COPIES(' ',8) DTYPE DNAME LISTVOL1 LISTVOL2 LISTVOL3
     DNAMET=DNAME
    END
    POS1 = POS1 + C2D(SUBSTR(DWORK,POS1,2))
  END
END
END
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: Thu Aug 28, 2008 10:27 pm    Post subject:
Reply with quote

vaas,

The correct DFSORT syntax for what you say you want would be:

Code:

 OUTFIL OUTREC=(C'/*REXX*/',80:X,/,
          C'  FILE_NAME="TSOXXXX.PAS.D',10,6,C'T*"',/,
          C'  "LISTCAT ENTRIES(''"FILE_NAME"'')"')
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Fri Aug 29, 2008 11:04 am    Post subject:
Reply with quote

Hello Frank,

wow! It's working fine. Thanks a lot icon_razz.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am


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