MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help Putting Quotes around a string of VB file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
raam_narayan
Beginner


Joined: 28 Apr 2006
Posts: 12
Topics: 2

PostPosted: Tue May 16, 2006 4:09 am    Post subject: Help Putting Quotes around a string of VB file Reply with quote

Hi

This is V.Ram Narayan.. I'm having a small clarification / dought in getting the output file during a srt phase thru JCl... My issue is, her is my infile e.g.

001 V.RAM NARAYAN SOFTWARE ENGINEER 36000 27

and i want my outfile to be like as follows :-

' 001 V.RAM NARAYAN SOFTWARE ENGINEER 36000 27 '

within quotes...my issue is i'm not sure how to convert the first and last byte to single quotes as this file is a VB..
so pls let me know or give me a sort card for achieving this.. appreciated the prompt reply..

Thanks & Regards,
V.Ram NArayan
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue May 16, 2006 7:02 am    Post subject: Reply with quote

raam_narayan,

Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=3874&highlight=syncrexx

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jaya
Beginner


Joined: 02 Sep 2005
Posts: 77
Topics: 10
Location: Cincinnati

PostPosted: Tue May 16, 2006 7:19 am    Post subject: Reply with quote

raam_narayan,

If your input VB file is of length 15 with 11 bytes of data, the following jcl will give you the desired results

Code:
//JAYA005  EXEC  PGM=SORT               
//SYSOUT   DD SYSOUT=*                 
//SORTIN   DD DISP=SHR,                 
//            DSN=ASOS.JAYA.VBIN2       
//SORTOUT  DD  DSN=ASOS.JAYA.VBOUT1,   
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(40,10),RLSE)
//SYSIN    DD  *                       
 OPTION COPY                           
 INREC FIELDS=(1,4,C'''',5)             
 OUTREC IFTHEN=(WHEN=INIT,             
           BUILD=(1,4,5)),             
        IFTHEN=(WHEN=(1,2,BI,EQ,+05),   
           OVERLAY=(06:C'''')),         
        IFTHEN=(WHEN=(1,2,BI,EQ,+06),   
           OVERLAY=(07:C'''')),         
        IFTHEN=(WHEN=(1,2,BI,EQ,+07),   
           OVERLAY=(08:C'''')),         
        IFTHEN=(WHEN=(1,2,BI,EQ,+08),   
           OVERLAY=(09:C'''')),         
        IFTHEN=(WHEN=(1,2,BI,EQ,+09),         
           OVERLAY=(10:C'''')),               
        IFTHEN=(WHEN=(1,2,BI,EQ,+10),         
           OVERLAY=(11:C'''')),               
        IFTHEN=(WHEN=(1,2,BI,EQ,+11),         
           OVERLAY=(12:C'''')),               
        IFTHEN=(WHEN=(1,2,BI,EQ,+12),         
           OVERLAY=(13:C'''')),               
        IFTHEN=(WHEN=(1,2,BI,EQ,+13),         
           OVERLAY=(14:C'''')),               
        IFTHEN=(WHEN=(1,2,BI,EQ,+14),         
           OVERLAY=(15:C'''')),               
        IFTHEN=(WHEN=(1,2,BI,EQ,+15),         
           OVERLAY=(16:C'''')),               
        IFTHEN=(WHEN=(1,2,BI,EQ,+16),         
           OVERLAY=(17:C''''))                 
/*                                             
//                                             


Hope this helps..

Regards,
Jaya.
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue May 16, 2006 11:00 am    Post subject: Reply with quote

With z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006), you can use DFSORT's new SQZ function to do this quite easily as shown by the DFSORT job below:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/80)
//SORTOUT DD DSN=...  output file (VB/80)
//SYSIN    DD    *
  OPTION COPY
* Add apostrophe before first nonblank and after last noblank.
  INREC OVERLAY=(5:5,76,SQZ=(SHIFT=LEFT,LEAD=C'''',TRAIL=C''''))
* Remove trailing blanks.
  OUTFIL VLTRIM=C' '
/*


For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group