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
 

 

How to abstract a specified string from JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to abstract a specified string from JCL
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 11:24 am    Post subject:
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    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 12:09 pm    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 12:41 pm    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 3:38 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 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
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


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