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

How to abstract a specified string from JCL


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
eHorizon.Andrew

New User


Joined: 18 Jan 2007
Posts: 28
Location: Bank of communications

PostPosted: Mon Sep 03, 2007 10:39 am
Reply with quote

hi,
I encounter a problem responsed from QA side,they need to check whether all the file names are valid in the JCL(always go after "DSN=" string), which have the fixed prefix. Since the JCL is too long, and maybe contain thousands of file names,so I need a jcl that can abstract all the filename(after "DSN=") and output to a specified file.

e.g. the input JCL - QA.TEST.FILE ,output file - QA.FILE.NAME , contains all the file name string in QA.TEST.FILE.

thanks for help....
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Sep 03, 2007 11:22 am
Reply with quote

eHorizon.Andrew

Check the Topic Find and extract values from different positions, at [url]http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
[/url]
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 11:24 am
Reply with quote

Andrew,

A simple search (3.15 option) in the batch mode should satisfy your requirement.
Back to top
View user's profile Send private message
eHorizon.Andrew

New User


Joined: 18 Jan 2007
Posts: 28
Location: Bank of communications

PostPosted: Mon Sep 03, 2007 11:26 am
Reply with quote

thanks ,I am going through that. icon_smile.gif
Back to top
View user's profile Send private message
eHorizon.Andrew

New User


Joined: 18 Jan 2007
Posts: 28
Location: Bank of communications

PostPosted: Mon Sep 03, 2007 12:02 pm
Reply with quote

I am following the step the book told, but get the RC ABEND, see below info:

COMPLETION CODE - SYSTEM=000 USER=0016 REASON=00000000

Is there any rule that specify the output record length should equal to the output file lenght?

my code is like this:

Code:
//MYIDG JOB  0VB055950918121000A1011010100TEST, 
//  'ANDREW',CLASS=0,MSGCLASS=R,TIME=(,05),         
//  NOTIFY=MYID                                 
//STEP1 EXEC PGM=ICEMAN                             
//SYSOUT DD SYSOUT=*                               
//SORTIN DD DSN=MYID.TEST.FILE(VB055C),DISP=SHR
//SORTOUT DD DSN=MYID.TEST.OUTPUT,DISP=SHR       
//SYSIN DD *                                       
  OPTION COPY                                       
  INREC PARSE=(%=(ENDAT=C'DSN='),                   
               %00=(STARTAFT=BLANKS,FIXLEN=40)),   
        BUILD=(%00)                                 
/*       
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 12:09 pm
Reply with quote

Andrew,

Please post spool messages.

Also SORTOUT has DISP=SHR, is it an existing file?
Back to top
View user's profile Send private message
eHorizon.Andrew

New User


Joined: 18 Jan 2007
Posts: 28
Location: Bank of communications

PostPosted: Mon Sep 03, 2007 12:15 pm
Reply with quote

yes, the two file was created before I run the job.

sysout message:

SYSIN :
OPTION COPY
INREC PARSE=(%=(ENDAT=C'DSN='),
*
%00=(STARTAFT=BLANKS,FIXLEN=80)),
BUILD=(%00)
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

I can not find any useful info in the JESYSMSG.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 12:41 pm
Reply with quote

Quote:
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000


Your shop uses SYNCSORT. And the link provided is of DFSORT thing.

Use the 3.15 option (batch mode).
Back to top
View user's profile Send private message
eHorizon.Andrew

New User


Joined: 18 Jan 2007
Posts: 28
Location: Bank of communications

PostPosted: Mon Sep 03, 2007 3:29 pm
Reply with quote

yes, I finally get the result I want, thank you murali...
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 3:38 pm
Reply with quote

You are welcome Andrew.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top