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 

Convert ISPF Commands to Batch(Sort or Fileaid)

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


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

PostPosted: Thu Jan 12, 2006 2:29 am    Post subject: Convert ISPF Commands to Batch(Sort or Fileaid) Reply with quote

Hi,

I have a flat file..
I am issuing the following primary commands successively.


[code:1:95e9efbd00]
1. x all
2.f '038' 99 101 all
3.c '5' '6' 103 103 all nx
4.c
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Jan 12, 2006 2:33 am    Post subject: Reply with quote

How about Edit-Macro written in REXX ?
Code:
/* REXX */

ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "X ALL"
ADDRESS ISREDIT "F '038' 99 101 ALL"
ADDRESS ISREDIT "C '5' '6' 103 103 ALL NX"
ADDRESS ISREDIT "C '2005' '2006' 1 4 ALL"

EXIT


O.
________
Ferrari F430 Challenge specifications


Last edited by ofer71 on Sat Feb 05, 2011 11:26 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Jaya
Beginner


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

PostPosted: Thu Jan 12, 2006 3:09 am    Post subject: Reply with quote

ofer71,

Thanks for your reply...

I need fileaid or sort solution as i don't know rexx.

The input file record length is 212.

Jaya.
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Jan 12, 2006 4:42 am    Post subject: Reply with quote

Jaya,

I don't know why you are reluctant using the rexx solution provided by Ofer. Its just executing the list of command that you have provided one-after-another automatically.

Anyway, here is a Untested sort code.
Code:

//R010   EXEC  PGM=SORT
//SORTIN   DD  DSN=your.input.file,DISP=SHR
//SORTOUT  DD  DSN=your.output.file,
//             DISP=OLD
//SYSOUT   DD  SYSOUT=*
//SYSIN    DD  *
  INREC FIELDS=(1,212        *  COPY ENTIRE LRECL      *
                213:99,3,    *  REPLICATE 99-101 DATA  *
                216:103,1,   *  REPLICATE 103 DATA     *
                217:99,3,    *  REPLICATE 99-101 DATA  *
                220:1,4)     *  REPLICATE 1-4          *
  SORT FIELDS=COPY
  OUTREC FIELDS=(1:217,7,CHANGE=(4,C'0382005',C'2006'),
                        NOMATCH=(1,4),
                 5:5,98,
                 103:213,4,CHANGE=(1,C'0385',C'6'),
                        NOMATCH=(103,1),
                 104:104,109)
/*


If you are using the latest version of DFSORT, then you may use the IF-THEN OVERLAY feature. I am not an expert at that. Probably Frank / Kolusu can help you out with that.

Cheers,

Phantom
Back to top
View user's profile Send private message
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