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
 

 

Justify option with some condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Mon Feb 22, 2010 6:28 pm    Post subject: Justify option with some condition
Reply with quote

I have to justify some record to left if some criteria is meet.
For example, if column 1-10 is space for any record. Move it's content to left.
How can i achieve this?
I know we can use DFSORT and JFY keyword.
But i want justify action only when certain criteria is met.
Please suggest.

Thanx in advance.
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: Mon Feb 22, 2010 6:49 pm    Post subject:
Reply with quote

Quote:
But i want justify action only when certain criteria is met.

Unless you tell us exactly what criteria, how do you expect us to be able to help.

Are we to assume that DFSORT can not be used for this requirement as you have stated that it can be done using DFSORT. If so, which product do you suggest is used in its place.

If DFSORT can be used please specify the RECFM and LRECL of the input file. Explain the rules for getting from the input to the output. Show examples of both input and output records.

Have you tried using DFSORT and JFY.
What problems did you have.
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Mon Feb 22, 2010 7:03 pm    Post subject:
Reply with quote

Input Records

Code:
             "CHECK"
FINAL112     214  016
FINAL112     362  023
FINAL214     209  016
GSCI200      704  //*
GSCI200C     704  //*
GSCI300      518  //*
GSC6100      610  //*
LISTJOB       13  SRC
MSG823        10  % 
             "REPORT"
BKCPAN08     116   IM
BKCPAN08     174   IM



Expected O/P
Code:
"CHECK"
FINAL112     214  016
FINAL112     362  023
FINAL214     209  016
GSCI200      704  //*
GSCI200C     704  //*
GSCI300      518  //*
GSC6100      610  //*
LISTJOB       13  SRC
MSG823        10  % 
"REPORT"
BKCPAN08     116   IM
BKCPAN08     174   IM



I am using this code in JCL, In which i need to mention the condition If any records contain spaces in first 5 column, shift it to left.
Code:
//SYSIN  DD *                                   
  OPTION COPY                                   
         INREC FIELDS=(1,25,SQZ=(SHIFT=LEFT)) 


Current O/p
Code:

"CHECK"           
FINAL112214016494
FINAL112362023010
FINAL214209016411
GSCI200704//*     
GSCI200C704//*   
GSCI300518//*     
GSC6100610//*     
LISTJOB13SRCHFO   
MSG82310%         
"REPORT"         
BKCPAN08116IMPQF 
BKCPAN08174IMPQF
[/code]
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Feb 22, 2010 9:50 pm    Post subject:
Reply with quote

Hi Sunil,
Use below sort card to get desired output.
Code:
 
//SYSIN    DD  *                                                     
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=(1,5,CH,EQ,C' '),BUILD=(1,25,SQZ=(SHIFT=LEFT)))
/*       
                                                           

Output will be
Code:
 
"CHECK"               
FINAL112     214  016
FINAL112     362  023
FINAL214     209  016
GSCI200      704  //*
GSCI200C     704  //*
GSCI300      518  //*
GSC6100      610  //*
LISTJOB       13  SRC
MSG823        10  %   
"REPORT"             
BKCPAN08     116   IM
BKCPAN08     174   IM
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Tue Feb 23, 2010 9:41 am    Post subject:
Reply with quote

Thanx a lot to all...

Sorting is not required for me so i use this code


Code:
//SYSIN  DD *                                     
  OPTION COPY                                     
         INREC IFTHEN=(WHEN=(1,5,CH,EQ,C' '),     
                   BUILD=(1,25,SQZ=(SHIFT=LEFT))) 


icon_biggrin.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Tue Feb 23, 2010 9:44 am    Post subject:
Reply with quote

Quote:
Sorting is not required for me so i use this code


SORT FIELDS=COPY does not sort, so ur code and Sambhaji's code are the same icon_smile.gif
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Tue Feb 23, 2010 9:46 am    Post subject:
Reply with quote

Ok..
Thanx for information.
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 BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Compiler option for override the exte... muralikrishnan_new COBOL Programming 9 Fri Jul 08, 2016 12:09 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am


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