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

JCL SORT CARD


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Fri Sep 27, 2013 7:40 pm
Reply with quote

Hello

I need to create a sort card where in my input files are having data like below.

sftp> ls -1
file1.zip
file2.zip
sftp> QUIT


I want the output file to contain as many as GET command as the number of zip files are present input file. Provided output file should look like as below-

Get file1.zip /path1
Get file2.zip /path2

Now if the input file contain 3 files the number of GET command sould be 3.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Sep 27, 2013 8:10 pm
Reply with quote

Use INCLUDE with SS to do a substring search for .zip.

The you can use a literal for the Get, and whatever magic you need for the /path.

I doubt that ftp will mind about any trailing blanks, but if you want it to look neater you can give it a bit of a SQZ afterwards.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Fri Sep 27, 2013 8:19 pm
Reply with quote

For the path actually i would like to see them as below over unix mainframe.

Get file1.zip /path/file1.zip
Get file2.zip /path/file2.zip
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 27, 2013 9:09 pm
Reply with quote

Hello,

If the output path is constant, just insert it as a literal when writing your output.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Sep 27, 2013 9:36 pm
Reply with quote

You'll need to know the maximum lengths of the fielname and pathname. You will then have to SQZ to make a valid filename including the path.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Fri Sep 27, 2013 9:41 pm
Reply with quote

Thanks Dick, thanks Bill .

Let me check, I will get back agaun.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Mon Sep 30, 2013 7:34 pm
Reply with quote

Hey Dick , hey Bill,

SQZ worked well for me. thanks
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top